nohm icon indicating copy to clipboard operation
nohm copied to clipboard

Add option to mark behavior property as "use scored sorting"

Open maritz opened this issue 7 years ago • 1 comments

Currently when you define a property with type behavior, it will never use scored indexing for sorts.

This means that for example creating a createdAt behavior automatically means that sorting by it uses redis.sort with O(N+M*log(M)) instead of redis.zrange/zrevrange with O(log(N)+M).

This can be a significant performance issue.

maritz avatar May 27 '18 15:05 maritz

Maybe something like "typeAsNumeric" that adds a step after typecasting as well to additionally type the return of the behaviour to int/float.

This is especially useful for fields like createdAt which is usually defined as readOnly by making the behaviour always return the old value.

maritz avatar May 30 '18 10:05 maritz