Restream / reindexer

Embeddable, in-memory, document-oriented database with a high-level Query builder interface.
https://reindexer.io
Apache License 2.0
770 stars 64 forks source link

Indexed fields and NULL value filtering #34

Closed radiophysicist closed 5 years ago

radiophysicist commented 5 years ago

Hello! I'm using reindexer via SQL-like interface. I noticed that in the case the field have any type of index queries containing checks for NULL values (i.e. field IS NULL / field IS NOT NULL) are working incorrectly. If I remove the index checks become working as expected. Is this intended behavior?

olegator77 commented 5 years ago

It's known issue of non-array indexes. Reindexer stores indexed fields as typed structure, and fields of this structure are not nullable (they uses memory euqal their size without any overhead).

There are work around: use "is_array" index option.

radiophysicist commented 5 years ago

This option has helped me, thanks. Unfortunately it is not clear from README that it could be used in such a manner

olegator77 commented 5 years ago

Fixed in 2.0.2 release: readme updated, validation of null condition for non array indexes added.