[
https://issues.apache.org/jira/browse/SOLR-16287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573007#comment-17573007
]
Christine Poerschke commented on SOLR-16287:
--------------------------------------------
I'd wondered about alternatives to "map" too but couldn't think of obvious
candidates so far.
If instead of
{code}
From: {"cand_id":5718,id:123,v_i:345}
To: { id:123, v_i:345, "cand_id": { "add-distinct": 5718 }}
{code}
the transformation was
{code}
From: {"cand_id":5718,id:123,v_i:345}
To: { id:123, v_i:345, "foobar_id": { "add-distinct": 5718 }},
{code}
i.e. optionally the {{cand_id}} can be changed at the same time, could that be
a use case and/or lead to a name?
And/Or might multiples give ideas e.g.
{code}
From: {"abc_id":5718,"xyz_id":789,id:123,v_i:345}
To: { id:123, v_i:345, "abc_id": { "add-distinct": 5718 }, "xyz_id": {
"add-distinct": 789 }}
{code}
And/Or the reverse transformation, if there was one, what might it be called?
{code}
From: { id:123, v_i:345, "cand_id": { "add-distinct": 5718 }}
To: {"cand_id":5718,id:123,v_i:345}
{code}
> MapStream - remap tuple value(s)
> ---------------------------------
>
> Key: SOLR-16287
> URL: https://issues.apache.org/jira/browse/SOLR-16287
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: streaming expressions
> Affects Versions: 9.0
> Reporter: Dan Rosher
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Remap from (k,v) => k -> newKey -> value
> e.g. with
> map(<stream>,"cand_id=add-distinct") , convert stream tuples from
> From
> {code:java}
> {"cand_id":5718,id:123,v_i:345}{code}
> To
> {code:java}
> {
> id:123,
> v_i:345,
> "cand_id": {
> "add-distinct": 5718
> }, {code}
> Useful for update stream for atomic updates.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]