<commit_before>/////////////////
//FACTS SCHEMA///
/////////////////
'use strict';
var mongoose = require('mongoose');

var factSchema, Fact,
    Schema      = mongoose.Schema,
    ObjectId    = Schema.Types.ObjectId,
    source      = {type: ObjectId, ref: 'Sources'};

factSchema = new Schema({
    source: source,
    //approved: Boolean,
    country: {
        type: ObjectId,
        ref: 'Country'},
    string: String,
    number: Number,
    date: Date,
    loc: {
        type: [Number],  // [<longitude>, <latitude>]
        index: '2d'      // create the geospatial index
    },
    poly: {
        type: {
            type: String,
            enum: ['LineString', 'Polygon'],
            default: 'Polygon'
        },
        coordinates: [
            { type: [
                { type: [ Number ] }
            ] }
        ]
    }
});

module.exports = factSchema;<commit_msg>fixed caster error with poly storage option in fact model<commit_after>/////////////////
//FACTS SCHEMA///
/////////////////
'use strict';
var mongoose = require('mongoose');

var factSchema, Fact,
    Schema      = mongoose.Schema,
    ObjectId    = Schema.Types.ObjectId,
    source      = {type: ObjectId, ref: 'Sources'};

factSchema = new Schema({
    source: source,
    //approved: Boolean,
    country: {
        type: ObjectId,
        ref: 'Country'},
    string: String,
    number: Number,
    date: Date,
    loc: {
        type: [Number],  // [<longitude>, <latitude>]
        index: '2d'      // create the geospatial index
    },
    //poly: {
    //    type: {
    //        type: String,
    //        enum: ['LineString', 'Polygon'],
    //        default: 'Polygon'
    //    },
    //    coordinates: [
    //        { type: [
    //            { type: [ Number ] }
    //        ] }
    //    ]
    //}
});

module.exports = factSchema;
{'fraction_non_alphanumeric': 0.18073593073593072, 'fraction_numerical': 0.0010822510822510823, 'mean_word_length': 1.4986486486486486, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '200286', 'n_tokens_mistral': 566, 'n_tokens_neox': 559, 'n_words': 136}