Closed haysclark closed 3 years ago
Hmmm... I think will close these because the example I put together was too contrived. Using a 'filter' does not add sorting, it was just a coincident that items were sorted in the order I was hoping for.
Your example did not cover a real world example. The entropy of your pseudo contents is just too low. FlexSearch is optimized for a real fulltext-search. The result from your example isn't wrong. You just expect a different sorting which you will get when you add real text content and use real queries (which probably exists of more than one term).
A solution could be found here: #236
I ran into this issue when adding the
filter
option to create(). Basically, when you repeat the same word over an over, the number of times it was used is lost if it's the only word in the string. Resulting in incorrect sorting when performing a search. ...maybeTora! Tora! Tora!
would be a real world example.I put together an interactive demo of the issue on CodeSandbox.