Skip to content

Reduce lexical search result limit and field weights#2467

Merged
Mbeaulne merged 1 commit into
masterfrom
06-29-limit_editor_component_search_result_noise_matt
Jun 29, 2026
Merged

Reduce lexical search result limit and field weights#2467
Mbeaulne merged 1 commit into
masterfrom
06-29-limit_editor_component_search_result_noise_matt

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Description

Reduces the default number of displayed search results from 50 to 10, applying the LEXICAL_RESULT_LIMIT cap to both lexical and reranked match lists so users see a focused set of results before opting into AI judgment.

Additionally, lowers the scoring weights for implementation and metadata fields significantly — implementation base weight drops from 1 to 0.25 and its phrase bonus from 2 to 0.5 — so that incidental keyword matches in command comments or container args no longer surface above results where the word appears in a component's name, description, or inputs/outputs.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. Open the component search panel and type a broad term (e.g. train). Confirm no more than 10 results are shown before triggering AI search.
  2. Search for a term that appears only inside a container command comment. Confirm that any component whose name or description contains the same term ranks above the implementation-only match.
  3. Run the test suite and confirm the new tests in componentSearchV2Logic.test.ts and componentSearchIndex.test.ts pass.

Additional Comments

The LEXICAL_RESULT_LIMIT constant is now exported from componentSearchV2Logic.ts so it can be referenced directly in tests to keep the cap assertion resilient to future value changes.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-29-limit_editor_component_search_result_noise_matt/debaf99

@Mbeaulne Mbeaulne marked this pull request as ready for review June 29, 2026 17:14
@Mbeaulne Mbeaulne requested a review from a team as a code owner June 29, 2026 17:14
@Mbeaulne Mbeaulne changed the title Limit editor component search result noise Reduce lexical search result limit and field weights Jun 29, 2026

Mbeaulne commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Jun 29, 5:50 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 29, 5:51 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 29, 5:53 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 29, 5:56 PM UTC: @Mbeaulne merged this pull request with Graphite.

@Mbeaulne Mbeaulne force-pushed the 06-29-limit_editor_component_search_result_noise_matt branch 2 times, most recently from fe16ad3 to 4c1dd36 Compare June 29, 2026 17:51
@Mbeaulne Mbeaulne force-pushed the 06-29-limit_editor_component_search_result_noise_matt branch from 4c1dd36 to debaf99 Compare June 29, 2026 17:52
@Mbeaulne Mbeaulne merged commit e2fe486 into master Jun 29, 2026
17 checks passed
@Mbeaulne Mbeaulne deleted the 06-29-limit_editor_component_search_result_noise_matt branch June 29, 2026 17:56
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.

2 participants