Skip to content

fix: omni search with no source and hidden errors - #316

Closed
divyanshugarg36 wants to merge 1 commit into
KhalisFoundation:devfrom
divyanshugarg36:fix-omni-source-filter
Closed

divyanshugarg36 wants to merge 1 commit into
KhalisFoundation:devfrom
divyanshugarg36:fix-omni-source-filter

Conversation

@divyanshugarg36

Copy link
Copy Markdown
Contributor

Omni search (searchtype=8) returned [] whenever no &source= was given.

  • With no source, omni.js built an empty Source= filter, which Meilisearch rejects.
  • The error was caught and turned into an empty array, so it looked like no results instead of a failure.

Changes:

  • omni.js filters on Source only when a source is given, and rethrows errors instead of returning [].
  • shabads.js passes the source only if it's a known one, and returns a 500 when the omni search fails.

Tested against a local Meilisearch: searches with no source return results again, and searches with a source are still filtered.

Merges cleanly with dev and with #315 (they edit different parts of omni.js).

Omni search built an empty Source= filter when no source was given, which
Meilisearch rejects, and the error was swallowed into an empty array.
Only filter on a known source, and return a 500 when the search fails.
@divyanshugarg36

Copy link
Copy Markdown
Contributor Author

Closing in favour of #317, which includes this source-filter and error-handling fix together with the search ranking rework from #315, in one branch on dev, tested together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant