Description
When performing a search for the phrase 'cats cute' using the match preset and forward tokenization, the results are returned in the order they were added, without sorting by closest match to the search phrase.
Steps to Reproduce
Initialize a FlexSearch index with the match preset and forward tokenization.
Add a series of strings to the index, each progressively shorter and varying by the inclusion of additional words.
Perform a search for the phrase 'cats cute'.
Expected Behavior
The search results should be sorted by relevance, with the string closest to 'cats cute' appearing first, followed by others in decreasing order of match closeness.
Actual Behavior
The search results are returned in the order of their insertion into the index, without any apparent sorting based on the query relevance.
Additional Information
This behavior may lead to inefficiencies and unexpected results in applications relying on relevance-based sorting for search functionality.
Description When performing a search for the phrase 'cats cute' using the
match
preset andforward
tokenization, the results are returned in the order they were added, without sorting by closest match to the search phrase.Steps to Reproduce
match
preset andforward
tokenization.Expected Behavior The search results should be sorted by relevance, with the string closest to 'cats cute' appearing first, followed by others in decreasing order of match closeness.
Actual Behavior The search results are returned in the order of their insertion into the index, without any apparent sorting based on the query relevance.
Code to Reproduce
Output
Additional Information This behavior may lead to inefficiencies and unexpected results in applications relying on relevance-based sorting for search functionality.