askorama / orama

🌌 Fast, dependency-free, full-text and vector search engine with typo tolerance, filters, facets, stemming, and more. Works with any JavaScript runtime, browser, server, service!
https://docs.askorama.ai
Other
8.27k stars 273 forks source link

Hybrid search: Missing documents and inaccurate count value with a where clause #730

Closed nicolastoulemont closed 2 weeks ago

nicolastoulemont commented 3 weeks ago

Describe the bug

Using the hybrid search with a where clause and a offset + a limit has two issues:

To Reproduce

You can find a codesandbox with the issue here

More details on the issue on slack here

TLDR: The issue is due to pagination being apply twice with the hybrid search call-stack both on the uniqueTokenScores and within the fetchDocuments function.

Expected behavior

Correct document fetching and correct count values.

Environment Info

OS: MacOS
Node: v20.X

Affected areas

Search

Additional context

No response

micheleriva commented 3 weeks ago

/bounty 75

algora-pbc[bot] commented 3 weeks ago

💎 $75 bounty • OramaSearch

Steps to solve:

  1. Start working: Comment /attempt #730 with your implementation plan
  2. Submit work: Create a pull request including /claim #730 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to askorama/orama!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🟢 @abhishek818 Jun 6, 2024, 1:17:42 AM #732
🟢 @rajeshj11 Jun 6, 2024, 10:31:50 AM #731
abhishek818 commented 3 weeks ago

/attempt #730

Algora profile Completed bounties Tech Active attempts Options
@abhishek818 4 bounties from 3 projects
JavaScript, TypeScript
Cancel attempt
rajeshj11 commented 3 weeks ago

/attempt #730

Algora profile Completed bounties Tech Active attempts Options
@rajeshj11 4 bounties from 3 projects
JavaScript, TypeScript,
HTML
Cancel attempt
algora-pbc[bot] commented 2 weeks ago

💡 @rajeshj11 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 1 week ago

🎉🎈 @rajeshj11 has been awarded $75! 🎈🎊