Skip to content

Fix searching for standalone symbolic entries - #2747

Open
Ethereal49 wants to merge 1 commit into
freeCodeCamp:mainfrom
Ethereal49:fix/search-standalone-operators
Open

Ethereal49 wants to merge 1 commit into
freeCodeCamp:mainfrom
Ethereal49:fix/search-standalone-operators

Conversation

@Ethereal49

Copy link
Copy Markdown

Searching Clojure for -> normalizes both the entry name and query to ., which is then rejected as a separator-only query. Preserve a standalone symbolic name when separator normalization would consume the entire name, after stripping the existing decorations. Compound names still use the existing separator normalization and ranking rules.

Fixes #817.

Added regression coverage for standalone symbols, decorated symbolic names, Clojure operators, member separators, namespaces, exact/fuzzy ranking, and the existing suppression of empty and dot-only queries. The new regressions fail on the original searcher.

Validation:

  • npm test: 47 passed, no skipped tests.
  • npm run typecheck: passed for assets and tests.
  • Current published Clojure 1.11 index (989 entries): reproduced zero results before the change and a correct -> match afterward through the actual Entry/Search/asynchronous Searcher modules in an isolated browser harness.
  • Compared complete ordered results for all 964 distinct Clojure entry-name queries, plus selected queries over current PHP, C++, JavaScript and the combined 16,721-entry index. Only -> becoming searchable and - additionally matching that entry changed; existing separator queries and relative ranking remained consistent.

The full Sinatra/Ruby app and Ruby suite were not run because the local Ruby/Bundler versions do not meet the repository requirements. The browser check used an isolated module harness with test replacements for generated config/templates, rather than the full site. Existing . and .. query suppression is unchanged.

Prepared with OpenAI Codex assistance; the automated tests, typechecks and isolated browser checks above were performed locally.

@Ethereal49
Ethereal49 requested a review from a team as a code owner October 4, 2026 03:36
Copilot AI balanced review requested due to automatic review settings October 4, 2026 03:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Function "->" is not returned for Clojure search

2 participants