nick-boss-tech opened a new pull request, #5231: URL: https://github.com/apache/solr/pull/5231
🤖 *AI text below* 🤖 *(reviewed by Nick Shanin)* https://issues.apache.org/jira/browse/SOLR-10928 ## What happens today **QueryElevationComponent has no separate parameter for a simplified elevation lookup string.** The component derives its lookup text from `q`, or from the parser's local `v` value when local parameters are present. A rule for `brain` may therefore not match a fielded search such as `q=indexingabstract:brain`. Clients using fielded, nested, or complexphrase queries need a way to supply simpler text for elevation matching, as spellcheck and highlighting allow with `spellcheck.q` and `hl.q`. ## What this change does **The change adds an `elevate.q` parameter that supplies the text to match against elevate.xml.** [QueryElevationParams](https://github.com/nick-boss-tech/solr/blob/5275653c66edc2610ab90046927d1c30fbe6f0f4/solr/solrj/src/java/org/apache/solr/common/params/QueryElevationParams.java) gains the `elevate.q` parameter name, and [QueryElevationComponent](https://github.com/nick-boss-tech/solr/blob/5275653c66edc2610ab90046927d1c30fbe6f0f4/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java) uses it for the elevate.xml lookup when it is present. It takes precedence over `q` and the parser's local `v` for lookup only, without replacing the search query. When absent, the existing fallback is preserved. An explicitly empty value does not fall back. Explicit `elevateIds` or `excludeIds` still bypass configured rules. The Reference Guide documents these semantics. ## Proof **Validation of the current head and fail-before proof are pending.** Current head `5275653c66edc2610ab90046927d1c30fbe6f0f4` adds `testElevateQOverridesFieldedSearchQuery`, checking `q=text:MMMM` with and without `elevate.q=YYYY`. The planned fail-before run uses this same endpoint test on base `b73f03976fa17b857bc0a81bc8af2c6b1c31e0bb`, which ignores the new parameter. No fail-before result is recorded yet. At the previous head `f2001e640a464e8e861ee3c202821b6dcc4bd497`, verified 2026-10-25: tidy clean with no tree changes, Error Prone compile clean, and `:solr:core:check -x test` passing. Focused runs at two seeds each: QueryElevationComponentTest 23/23, QueryElevationComponentParamTest 4/4, DistributedQueryElevationComponentTest 1/1, with zero failures and zero errors at both seeds. These results predate the added fielded-query test and do not validate the current head. ## Limits The full `:solr:core:test` suite has not been run. Matching continues to use the configured `queryFieldType` analyzer and the existing exact or subset matching rules. This change selects an alternate input string for that process; it does not parse `elevate.q` as a search query. Distributed coverage is two new request cases within the one test method in DistributedQueryElevationComponentTest. Changelog: [changelog/unreleased/SOLR-10928-elevate-q.yml](https://github.com/nick-boss-tech/solr/blob/5275653c66edc2610ab90046927d1c30fbe6f0f4/changelog/unreleased/SOLR-10928-elevate-q.yml) *AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
