Skip to content

SOLR-18227 - Add native support for NamedQueries in Solr#4402

Open
squallsama wants to merge 1 commit intoapache:mainfrom
squallsama:named_queries_matched_component
Open

SOLR-18227 - Add native support for NamedQueries in Solr#4402
squallsama wants to merge 1 commit intoapache:mainfrom
squallsama:named_queries_matched_component

Conversation

@squallsama
Copy link
Copy Markdown

Adds _name local-param support to 8 core query parsers so any query clause can be labelled for post-search introspection via NamedMatches:

term, terms, bool, lucene, prefix, dismax, edismax, fuzzy

Introduces MatchedQueriesComponent: a SearchComponent activated by matched_queries=true (alias mq=true) that performs a lightweight second pass over the top-N hits using Weight.matches() and reports which named clauses fired, both per-document and as a summary.

https://issues.apache.org/jira/browse/SOLR-18227

Description

Please provide a short description of the changes you're making with this pull request.

Solution

Please provide a short description of the approach taken to implement your solution.
We appreciate transparent disclosure of significant AI Coding assistants usage.

Tests

Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

Adds _name local-param support to 8 core query parsers so any query
clause can be labelled for post-search introspection via NamedMatches:

  term, terms, bool, lucene, prefix, dismax, edismax, fuzzy

Introduces MatchedQueriesComponent: a SearchComponent activated by
matched_queries=true (alias mq=true) that performs a lightweight
second pass over the top-N hits using Weight.matches() and reports
which named clauses fired, both per-document and as a summary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant