Add 'sort' to /documents/fetch route #657
Replies: 8 comments 12 replies
-
I was about to propose the same feature. My use case is as follows: I want to have a paginatable list of documents matching a specific filter. The default now is "Best Match" but a custom sort criteria - as for the search - would be useful here. |
Beta Was this translation helpful? Give feedback.
-
Hi @tacman @daFish , thank you both for your feedback! Could you perhaps expand on the reasons behind not using the |
Beta Was this translation helpful? Give feedback.
-
Mine is not a particularly sophisticated reason -- when debugging, it's easier to send and replay a GET request than a POST. There's always the extra step of examining the payload, and I can't simply open the URL another other tab and hit refresh to view the data. |
Beta Was this translation helpful? Give feedback.
-
Maybe. I don't need more than 1000 documents in a single call, but I do
need to know an accurate number of results, which I can then paginate.
Another reason to have a sort is so that pagination is consistent. I've
been burned going through an entire dataset with postgres without sorting
the query and discovering that fetching by offset / limit may get
duplicates and skip some records if there isn't a sort.
…On Thu, Jun 8, 2023 at 8:22 AM Maria Craig ***@***.***> wrote:
Would the /search GET route
<https://www.meilisearch.com/docs/reference/api/search#search-in-an-index-with-get>
work for you?
—
Reply to this email directly, view it on GitHub
<#657 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEXIQILWD4QDVNRBH7UHQLXKHN4HANCNFSM6AAAAAAYKGHKVE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks!
It looks like you have to pay to join productboard.
Tac
…On Thu, Jun 22, 2023 at 10:59 AM Maria Craig ***@***.***> wrote:
Thank you both for sharing your use cases. It has inspired a potential
enhancement, which we've added to our public roadmap
<https://meilisearch.productboard.com/portal/1-meilisearch/tabs/610f17a9-3989-4418-b4ee-16a65b102e41/features/5000020/portal/expanded>.
It would be great if you upvote the feature, as your input helps us
prioritize our future development efforts.
—
Reply to this email directly, view it on GitHub
<#657 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEXIQIBWXYVFSQBYBHQABTXMR2W7ANCNFSM6AAAAAAYKGHKVE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Upvote to this feature request from @panzer-punk on #666 |
Beta Was this translation helpful? Give feedback.
-
Has there been further consideration about adding this feature request? I voted on the roadmap, but just curious if it's going to be added anytime soon. I'm evaluating Meilisearch for Trakt and we have pages such as https://trakt.tv/shows/watched/weekly which would return all show documents (no query), but I'd need to sort by the watched_count field. |
Beta Was this translation helpful? Give feedback.
-
This feature is highly important. Currently, sorting within search results always considers relevance, but there’s no option for strict sorting when fetching documents directly. If strict sorting were available for fetching, Meilisearch could be used not only for search functionalities but also for retrieving all kinds of structured data, similar to a traditional database. Strict sorting in document fetching, without relevance adjustments, would greatly broaden Meilisearch’s application. We hope this feature is prioritized for release soon. |
Beta Was this translation helpful? Give feedback.
-
Since the new "fetch" route has offset and limit parameters, it seems like it should have a 'sort' parameter as well.
This will be a nice feature when browsing an index by facets without needing to search the text fields.
https://github.com/meilisearch/meilisearch/releases
Beta Was this translation helpful? Give feedback.
All reactions