[
https://issues.apache.org/jira/browse/SOLR-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Gove updated SOLR-8556:
------------------------------
Attachment: SOLR-8556.patch
Adds ConcatOperation specific tests. Corrects the issues mentioned above. Would
still like to add a test showing the usage of this inside a SelectStream. For
example, there is a difference between these two clauses
{code}
select(a,b,c, search(....), replace(a,null,withValue=0f), concat(fields="a,b",
as="ab", delim="-"))
{code}
{code}
select(a,b,c, search(....), concat(fields="a,b", as="ab", delim="-"),
replace(a,null,withValue=0f))
{code}
In the first one a null value in field a will first be replaced with 0 and then
concatenated with b whereas in the second one a and b will be concatenated
first and then a null value in a would be replaced with 0. Ie, the order of
operations matters.
Also note, I added a feature which, for null values, will concatenate the
string "null". If one wants to replace null with a different value then one can
use the replace operation in conjunction with the concat operation.
> Add ConcatOperation to be used with the SelectStream
> ----------------------------------------------------
>
> Key: SOLR-8556
> URL: https://issues.apache.org/jira/browse/SOLR-8556
> Project: Solr
> Issue Type: New Feature
> Reporter: Joel Bernstein
> Assignee: Joel Bernstein
> Attachments: SOLR-8556.patch, SOLR-8556.patch
>
>
> Now that we have the UpdateStream it would be nice to support the use case of
> sending rolled up aggregates for storage in another SolrCloud collection. To
> support this we'll need to create id's for the aggregate records.
> The ConcatOperation would allows us to concatenate the bucket values into a
> unique id. For example:
> {code}
> update(
> select(
> rollup(search(q="*:*, fl="a,b,c", ...)),
> concat(fields="a,b,c", delim="_", as="id")))
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]