mongodb-schema icon indicating copy to clipboard operation
mongodb-schema copied to clipboard

allow categories for other types, like numbers, dates

Open rueckstiess opened this issue 10 years ago • 2 comments
trafficstars

Instead of converting string to text / category type, provide native type and add a boolean flag $category.

Provide a parameter to determine how many values make a category.

rueckstiess avatar Dec 02 '14 10:12 rueckstiess

Proposal for new schema schema:

{
    $count: 100,
    field: {
        $count: 50,
        $prob: 0.5, 
        $type: 'number',
        $array: true,
        $category: true,
        $hist: [ 
            {v: 1, c: 34}, 
            {v: 2, c: 15}, 
            {v: 0, c: 1},
            {o: 23432}
        ],
        $stats: {
            min: 0,
            max: 2,
            mean: 1.3231,
            std: 0.062
        }
    }
}

rueckstiess avatar Dec 03 '14 02:12 rueckstiess

histogram bins feels right

imlucas avatar Dec 04 '14 03:12 imlucas