redis-index
Index and query arbitrary objects with Redis.
example
var index = ; index;index;index; ;
api
RedisIndex
- RedisIndex.createIndex(options)
Create a new index to which objects may be added.
- options : options objects
- key : string - the namespace key to use when storing keys in redis
- index : string - the attribute which exists on an object being indexed which should be used to uniquely identify that object.
- schemaOnly : boolean - when true, only index fields identified in the schema
- fullText : function - when exists, this function will be called with each object being added to the index. The function should return a string to be indexed for full text search. This option must be present in order to enable full text search.
- schema : object - an object which identifies information about attributes encountered when indexing.
- compress : object - and object with synchronous encode and decode functions for compressing and decompressing values
more examples
compression
var RedisIndex = ; var index = RedisIndex;
TODO
- proper tests
- comparisons
- deep lookups
- arrays of values
- arrays of objects
- automatic full deep indexing
- wildcards for schema definitions
- add comparisons
- exists
- empty/notExists
- contains
- begins with
- ends with
- in array (of values)
- full text
- string comparisons
- sorting
- intersect with other indexes
- store key
- add array of objects
- custom string tokenizing
- paging
- make Promise compatible
- compression
license
MIT