fergiemcdowall / search-index

A persistent, network resilient, full text search library for the browser and Node.js
MIT License
1.38k stars 149 forks source link

Indexing documents with empty object props #571

Closed jakobsa closed 2 years ago

jakobsa commented 2 years ago

When documents contain properties with empty objects PUT will throw an exception originating from charwise.

I have modified the CLI example by adding such a property here: forked and modified Cli Example

As I am just getting to know your search-index package I am a bit reluctant to open an issue for the first obstacle I encounter. However I did not find documentation or discussion on this behavior. I would like to know if this behavior is expected.

fergiemcdowall commented 2 years ago

Thanks for the feedback @jakobsa , I really value it, so donโ€™t feel any reluctance! ๐Ÿ™‚. I am a bit busy with family stuff at the moment but will try and take a look at this soon.

fergiemcdowall commented 2 years ago

This should now be fixed in search-index@3.0.3

Does it work for you @jakobsa ?

jakobsa commented 2 years ago

I can confirm that my test case is now working without delete objToIndex.emptyObj workaround.

fergiemcdowall commented 2 years ago

Good to hear! ๐Ÿ‘