Syncano / syncano-node

Syncano Toolkit for JavaScript development
https://syncano.io
MIT License
62 stars 8 forks source link

Document which fields can be index'ed #180

Open mkucharz opened 6 years ago

mkucharz commented 6 years ago

Where we can add order_index, filter_index etc.

mkucharz commented 6 years ago

Part of this could be porting https://legacy-docs.syncano.io/docs/data-objects-filtering-ordering

23doors commented 6 years ago

Current state of core:

all_types = {'string', 'text', 'integer', 'float', 'boolean', 'datetime', 'file', 'reference', 'object', 'array', 'geopoint', 'relation'}
noindex_types = {'text', 'file', 'object'}  # these cannot have any indexes at all

special cases: 
reference - can have filter, unique but no order
array, geopoint and relation - only filter (no unique, no order)
mkucharz commented 6 years ago

@23doors so beside array, geopoint and relation all other can have unique? or text file and object also don't have unique?

23doors commented 6 years ago

text, file and object cannot have any index at all - be that order, filter or unique. So text, file, object, array, geopoint and relation all cannot be unique.