<commit_before>/*!
 * Module dependencies.
 */

var _ = require('underscore'),
	util = require('util'),
	super_ = require('../Type');
	
var REGEXP_LNGLAT = /^\s*(\d+(?:\.\d+)?)\s*\,\s*(\d+(?:\.\d+)?)\s*$/;

/**
 * Geo FieldType Constructor
 * @extends Field
 * @api public
 */

function geopoint(list, path, options) {
	
	this._fixedSize = 'medium';
	
	// TODO: implement filtering, hard-coded as disabled for now
	options.nofilter = true;
	geopoint.super_.call(this, list, path, options);
	
}

/*!
 * Inherit from Field
 */

util.inherits(geopoint, super_);


/**
 * Registers the field on the List's Mongoose Schema.
 *
 * Adds a 2dsphere indexed lat/lng pair
 *
 * @api public
 */

geopoint.prototype.addToSchema = function() {
	this.list.schema.path(this.path, { type: [Number], index: '2dsphere' });
	this.bindUnderscoreMethods();
};


/**
 * Gets the field's data from an Item, as used by the React components
 */

geopoint.prototype.getData = function(item) {<commit_msg>Fixing defaults and other options for GeoPoint, ref #969<commit_after>/*!
 * Module dependencies.
 */

var _ = require('underscore'),
	util = require('util'),
	super_ = require('../Type');
	
var REGEXP_LNGLAT = /^\s*(\d+(?:\.\d+)?)\s*\,\s*(\d+(?:\.\d+)?)\s*$/;

/**
 * Geo FieldType Constructor
 * @extends Field
 * @api public
 */

function geopoint(list, path, options) {
	
	this._fixedSize = 'medium';
	
	// TODO: implement filtering, hard-coded as disabled for now
	options.nofilter = true;
	geopoint.super_.call(this, list, path, options);
	
}

/*!
 * Inherit from Field
 */

util.inherits(geopoint, super_);


/**
 * Registers the field on the List's Mongoose Schema.
 *
 * Adds a 2dsphere indexed lat/lng pair
 *
 * @api public
 */

geopoint.prototype.addToSchema = function() {
	this.list.schema.path(this.path, _.defaults({ type: [Number], index: '2dsphere' }, this.options));
	this.bindUnderscoreMethods();
};


/**
 * Gets the field's data from an Item, as used by the React components
 */

geopoint.prototype.getData = function(item) {
{'fraction_non_alphanumeric': 0.17925925925925926, 'fraction_numerical': 0.0034567901234567903, 'mean_word_length': 3.689814814814815, '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': '508885', 'n_tokens_mistral': 738, 'n_tokens_neox': 700, 'n_words': 176}