<commit_before>'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

/**
 * Offers Schema
 */
var OfferSchema = new Schema({
	status: {
		type: String,
		enum: ['yes','maybe','no'],
		default: 'no'
	},
	description: {
		type: String,
		default: '',
		trim: true
	},
	noOfferDescription: {
		type: String,
		default: '',
		trim: true
	},
	maxGuests: {
		type: Number,
		min: 0,
		max: 99,
		default: Date.now
	},
	location: {
		type: []
	},
	updated: {
		type: Date,
		default: Date.now
	},
	user: {
		type: Schema.ObjectId,
		ref: 'User'
	}
});

// Geospatial index (lat,lon)
OfferSchema.index({ location: '2d' });

mongoose.model('Offer', OfferSchema);<commit_msg>#4 Add fuzzy location field<commit_after>'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

/**
 * Offers Schema
 */
var OfferSchema = new Schema({
	status: {
		type: String,
		enum: ['yes','maybe','no'],
		default: 'no'
	},
	description: {
		type: String,
		default: '',
		trim: true
	},
	noOfferDescription: {
		type: String,
		default: '',
		trim: true
	},
	maxGuests: {
		type: Number,
		min: 0,
		max: 99,
		default: Date.now
	},
  location: {
    type: []
  },
	locationFuzzy: {
		type: []
	},
	updated: {
		type: Date,
		default: Date.now
	},
	user: {
		type: Schema.ObjectId,
		ref: 'User'
	}
});

// Geospatial index (lat,lon)
OfferSchema.index({ location: '2d' });
OfferSchema.index({ locationFuzzy: '2d' });

mongoose.model('Offer', OfferSchema);
{'fraction_non_alphanumeric': 0.18446601941747573, 'fraction_numerical': 0.006472491909385114, 'mean_word_length': 3.3549295774647887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5427341', 'n_tokens_mistral': 639, 'n_tokens_neox': 594, 'n_words': 134}