YapDatabase icon indicating copy to clipboard operation
YapDatabase copied to clipboard

Sorting FTS results with the query instead of with YapDatabaseSearchResultsView

Open rainwolf opened this issue 9 years ago • 1 comments

I'm using the full text search extension and discovered my results weren't in the order I wanted them to be so I pipe them to a YapDatabaseSearchResultsView to sort them and display them. It's pretty fast, but searching with a single character is noticeably slower because of the number of results. I was wondering if there's a way to order (and limit) the results in the FTS query already, before passing them to YapDatabaseSearchResultsView or omitting that entirely.

rainwolf avatar Nov 10 '16 08:11 rainwolf

Facing the same issue with storing data that is coupled with a timestamp. While searching for content, I would prefer to get the most recently indexed data as the first result but the results are returned in the order in which they were indexed. Even a reverse enumerator would somewhat solve my problem.

In the current implementation, I have to fetch all the results and only then will I be to populate the UI. This is not a scalable solution.

karthikbaskar avatar Apr 19 '18 05:04 karthikbaskar