Repository navigation
SOLR-8003: A glob followed by a raw value transformer now writes each matching field raw - #5140
Closed
nick-boss-tech wants to merge 3 commits into
Closed
nick-boss-tech wants to merge 3 commits into
nick-boss-tech wants to merge 3 commits into
Conversation
nick-boss-tech
added a commit
to nick-boss-tech/solr
that referenced
this pull request
Oct 16, 2026
nick-boss-tech
marked this pull request as ready for review
October 16, 2026 06:47
nick-boss-tech
force-pushed
the
solr-8003-submit
branch
from
October 22, 2026 23:43
85a8d32 to
d57db16
Compare
nick-boss-tech
force-pushed
the
solr-8003-submit
branch
from
October 23, 2026 00:34
83ad623 to
a24414b
Compare
Contributor
Author
|
🤖 AI text below 🤖 (reviewed by Nick Shanin) @dsmiley, this is the follow-up to #5188. Please review the raw-glob change in Recommendation: review the raw-glob path first. It is the part that changes behavior.
Bottom line: if the raw-glob design looks right, the rest is ready for review. |
Contributor
|
@nick-boss-tech Has anyone requested this in the last 5 years and/or re-communicated the need? If not, please don't invest in a solution to an old feature-request without that confirmation. |
Contributor
Author
|
Closing for lack of interest. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖 (reviewed by Nick Shanin)
https://issues.apache.org/jira/browse/SOLR-8003
What happens today
A glob cannot take a raw value transformer, so
fl=*_json:[json]returns a 400.The parser accepts a glob only when a space, a comma or the end of the string follows it (lines 305-316 at the merge base). A raw transformer works on one named field, so every
_jsonfield must be named.What this change does
A glob followed by a raw value transformer writes each matching field raw.
fl=*_json:[json]andfl=su*:[json]are accepted. Each returned field whose name matches is written raw under its own name (lines 318-347). A bare*before a raw transformer returns a 400 (lines 320-325). The JSON and XML writers check the mark for each field (lines 122-135).This is the follow-up to #5188, which adds the
ReturnFieldsmethods the tests for this change use. It is built on main, so it does not depend on #5188 to compile. ThreeReturnFieldsunit tests that use those methods are left for after #5188 merges. Merge #5188 first. This PR then applies with one conflict, inTestExportWriter.java, where both PRs add tests at the end of the file. The production code has no conflicts in either order.Proof
The raw-glob cases pass with this change and fail on main.
a24414bf3d9:TestRawTransformer17/17,TestExportWriter22/22.b73f03976fa), 15 of 17TestRawTransformercases and 2 of 22TestExportWritercases fail, each with a 400 from the parser. The cases that pass on main use no glob.A choice to check
A renamed field under a raw glob comes back plain.
In
fl=p:payload_json,*_json:[json], the field is returned asp, which does not match*_json. The guide matches globs against returned names (line 222).p:[json f=payload_json]already writes a renamed field raw (test).f=.p:payload_jsonunder*_json:[json]is raw. The output would depend on a name the response no longer returns.Decision ladder:
Recommendation: A. The guide describes globs by returned names, and
p:[json f=payload_json]covers the renamed case.Was this the right call?
Limits
/exportignores the raw mark. Its output with a raw glob matches the plain glob.*_json:[xml]onwt=jsonreturns plain values.flglobs already have. Caching the split is a possible follow-up./get, highlighting, term vectors.ReturnFieldsunit tests for SOLR-11364: fl= fix some minor issues, mostly with globs #5188's methods follow once SOLR-11364: fl= fix some minor issues, mostly with globs #5188 merges.Changelog: changelog/unreleased/SOLR-8003-fl-glob-raw-transformer.yml
Ref Guide: document-transformers.adoc, the
[json] / [xml]section, documents the glob form and its limits (commit874766b7625, docs only; the code proof above is ata24414bf3d9).AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.