Select with concat function not working in 8.4.1

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Select with concat function not working in 8.4.1

Guilherme Nunes
Greetings.

In upgrading to solr 8.4.1, the following streaming expression is not working for me:

select(
        cartesianProduct(
                tuple(k1="1", k2=array(a)),
                k2, productSort="k1 asc"),
        "k1”,
        concat(fields="k1",delim=",",as="node")  )

Returning “"Invalid expression select(cartesianProduct(tuple(k1=1,k2=array(a)),k2,productSort=\”k1 asc\"),\"k1\",concat(fields=k1,delim=\",\",as=node)) - unknown operands found"”.

But it works fine in 8.2.0.

Am I missing something, or should a jira ticket be opened for this?

Thank you

Kind regards,
Guilherme Nunes
Reply | Threaded
Open this post in threaded view
|

Re: Select with concat function not working in 8.4.1

Guilherme Nunes
Greetings.

A follow-up to the below with my findings.

The problem seems to be that the binding of “concat” on the StreamFactory.functionNames maps to ConcatEvaluator in 8.4.1, while in 8.2 it mapped to ConcatOperation.
The mapping is defined in the file Lang.java

Branch_8_4:

Branch_8_2:
The workaround to achieve a functioning move from 8.2 to 8.4.1, in our case, was to override the mapping of concat in the solrconfig.xml with
<expressible name="concat" class=“org.apache.solr.client.solrj.io.ops.ConcatOperation” />

Kind regards,
Guilherme Nunes

On 20 Jan 2020, at 11:38, Guilherme Nunes <[hidden email]> wrote:

Greetings.

In upgrading to solr 8.4.1, the following streaming expression is not working for me:

select(
cartesianProduct(
tuple(k1="1", k2=array(a)),
k2, productSort="k1 asc"),
"k1”,
concat(fields="k1",delim=",",as="node")  )

Returning “"Invalid expression select(cartesianProduct(tuple(k1=1,k2=array(a)),k2,productSort=\”k1 asc\"),\"k1\",concat(fields=k1,delim=\",\",as=node)) - unknown operands found"”.

But it works fine in 8.2.0.

Am I missing something, or should a jira ticket be opened for this?

Thank you

Kind regards,
Guilherme Nunes

Reply | Threaded
Open this post in threaded view
|

Re: Select with concat function not working in 8.4.1

Joel Bernstein
The concat function was changed to an evaluator. An example of the new syntax is here:

Sorry for confusion the language should be settling down now with very of these types of changes happening going forward.

On Fri, Jan 24, 2020 at 5:16 AM Guilherme Nunes <[hidden email]> wrote:
Greetings.

A follow-up to the below with my findings.

The problem seems to be that the binding of “concat” on the StreamFactory.functionNames maps to ConcatEvaluator in 8.4.1, while in 8.2 it mapped to ConcatOperation.
The mapping is defined in the file Lang.java

Branch_8_4:

Branch_8_2:
The workaround to achieve a functioning move from 8.2 to 8.4.1, in our case, was to override the mapping of concat in the solrconfig.xml with
<expressible name="concat" class=“org.apache.solr.client.solrj.io.ops.ConcatOperation” />

Kind regards,
Guilherme Nunes

On 20 Jan 2020, at 11:38, Guilherme Nunes <[hidden email]> wrote:

Greetings.

In upgrading to solr 8.4.1, the following streaming expression is not working for me:

select(
cartesianProduct(
tuple(k1="1", k2=array(a)),
k2, productSort="k1 asc"),
"k1”,
concat(fields="k1",delim=",",as="node")  )

Returning “"Invalid expression select(cartesianProduct(tuple(k1=1,k2=array(a)),k2,productSort=\”k1 asc\"),\"k1\",concat(fields=k1,delim=\",\",as=node)) - unknown operands found"”.

But it works fine in 8.2.0.

Am I missing something, or should a jira ticket be opened for this?

Thank you

Kind regards,
Guilherme Nunes