typesense / typesense/typesense
Feature Request: stopIfEnoughMatches and pagination for multi-index/federated search
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.6k
- Forks
- 973
- Avg merge
- 18h 45m
- Merged PRs (30d)
- 4
Description
Description
Would love to have the ability to paginate on multi/federated search without skipping any results. When using algolia, you can do this by passing a strategy of stopIfEnoughMatches:
https://www.algolia.com/doc/api-reference/api-methods/multiple-queries/#method-param-strategy
The request, in pseudo code, would look something like:
Typesense.multi_search({
strategy: "stopIfEnoughMatches",
searches: [
{
collection: "user_recipes",
q: query,
per_page: 20,
page: page_number,
query_by: "name",
},
{
collection: "preset_recipes",
q: query,
per_page: 20,
page: page_number,
query_by: "name",
}
]
})
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by reviewing the multi_search API and the linked Algolia stopIfEnoughMatches strategy; done means federated pagination returns results without skipping matches while honoring the requested page and per_page values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100