Skip to content

Rank the app a search word names ahead of description matches - #1464

Merged
helpcodeai merged 1 commit into
mainfrom
fix/catalog-search-name-first
Nov 3, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/catalog-search-name-first

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

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_connectors and 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 as partial.
  • Guards: a word starting more than 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.
  • Specs for the queries above, the word order and the partial marking. 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

  • Bug fix

Testing

  • Added/updated unit tests
  • 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.
  • Re-ran the failing queries against the full catalog: Instagram, Etsy, Etsy, Gmail, WhatsApp Business and Telegram now come first. "etsy printify printful gelato" returns the four apps in that order.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • This PR has a descriptive title

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.
@helpcodeai
helpcodeai enabled auto-merge (squash) November 3, 2026 07:16
@helpcodeai
helpcodeai merged commit d2d51d8 into main Nov 3, 2026
15 checks passed
@helpcodeai
helpcodeai deleted the fix/catalog-search-name-first branch November 3, 2026 07:32
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant