Repository navigation
Rank the app a search word names ahead of description matches - #1464
Merged
Merged
Conversation
In a query of several words, a word that starts an adapter's slug or name
now puts that adapter first: "instagram direct message" returned no
Instagram in the top four, and "etsy listings search" put eBay first,
because other adapters matched more of the remaining words in their
descriptions. A word starting more than five names ("google") moves
nothing, a first result matching the whole query by name stays first, and
File Search words keep their own suggestions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In a search of several words, the app a word names now comes first. Before, an adapter matching more of the other words in its description won: "instagram direct message" returned no Instagram in the top four (Checko, Google Chat, ManyChat, Orderful), "etsy listings search" put eBay Browse first, "etsy open api v3" put OpenProject first and "whatsapp messages chats" left WhatsApp Business out. The chat's setup search (
setup_find_connectorsand the search-tools fallback), the store and /welcome all use this search, and the chat gets these multi-word queries most.Changes
catalog-search.ts(backend and its byte-identical frontend copy), new step 5: a query word that is the first word of an adapter's slug or name (instagram, etsy, whatsapp, gmail) puts that adapter ahead of the other results, in the order of the query words. When the other words did not match it, it comes in aspartial.MAX_NAMED(5) names, like "google" or "microsoft", names no single app and moves nothing. A first result that matches the whole query by name ("telegram bot", "google calendar events") stays first. File Search words ("storage box") keep their own suggestions.partialmarking. The "google calendar events" spec guards against a word that starts many names.Same behaviour on Cloud and self-hosted: the search runs over whatever catalog the deployment offers.
Type
Testing
packages/backend:npx jest --maxWorkers=4 src/adapters/catalog-search.spec.ts src/auth/login.controller.spec.ts src/adapters/connector-setup src/mcp-server/shared: 297 passed.packages/backend:npx eslint src/adapters/catalog-search.ts src/adapters/catalog-search.spec.ts: clean.packages/frontend:npx eslint src/lib/catalog-search.ts: clean.Checklist