[
https://issues.apache.org/jira/browse/SOLR-9957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126540#comment-18126540
]
David Smiley commented on SOLR-9957:
------------------------------------
Why support document transformers in {{/export}}:
* *Consistency with {{/select}}:* {{fl}} means the same thing in both handlers.
Transformers and aliases like {{fl=id,price:price_d}} were silently ignored by
{{/export}}, which surprises users. An alias even came back under the original
field name.
* *Computed values at export scale:* per-document values such as {{[docid]}},
{{[value]}}, {{[explain]}}, {{[json]}}, {{[geo]}} or custom plugin transformers
can now be exported in bulk, instead of paging through {{/select}} with deep
paging.
* *Richer tuples for streaming expressions:* transformer output reaches the
local {{expr}} decorators ({{top}}, {{unique}}, {{rollup}}, ...) and, through
{{search(..., qt="/export")}}, any streaming expression. Derived values can be
computed at the source, next to the index, instead of being re-fetched or
rebuilt downstream.
* *Opens the door to per-document enrichment of exported results:* for example,
a highlighting transformer could add snippets to each exported document and
tuple, without a separate request keyed by id.
* *Plugin authors get one extension point:* a custom {{DocTransformer}} now
works for both {{/select}} and {{/export}}, so nobody has to write a second
mechanism (e.g. a custom stream decorator) just for exports.
* *Fixes a parsing bug:* {{fl}} was split naively on commas, so transformer
local params containing commas (e.g. {{[value v='a,b']}}) broke. {{fl}} is now
parsed the same way {{/select}} parses it.
* *No cost when unused:* the plain field path is unchanged and doesn't allocate
per document. The extra per-document work only happens when {{fl}} contains a
transformer.
Limitations: transformers that need scores or a {{DocList}} aren't supported,
since {{/export}} has neither.
🤖 This comment was AI-generated (Claude Code).
> /export does not support transformers
> -------------------------------------
>
> Key: SOLR-9957
> URL: https://issues.apache.org/jira/browse/SOLR-9957
> Project: Solr
> Issue Type: New Feature
> Reporter: Noble Paul
> Assignee: David Smiley
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The behavior should be similar to other search handlers
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]