Could it be that Solr 8.3 is more strict on the if statement?
the statement if(eq(1,1),Y,N)
is supposed to return the character Y (not the field). In Solr 8.2 it
returns the character Y, but in Solr 8.3 not.

On Tue, Nov 19, 2019 at 11:21 PM Jörn Franke <jornfra...@gmail.com> wrote:

> thanks i will find another installation of Solr, but last time the
> underlying queries to the export handler were correct. What was wrong was
> the generated field "found" based on the if statement based NOT on any data
> in the collectioj.  As said, in Solr 8.3 the id fields are returned, but
> not the "found" field, which is generated by the selected statement:
> select(search(testcollection,q="test",df="Default",defType="edismax",fl=
> "id", qt="/export", sort="id asc"),id,if(eq(1,1),Y,N) as found)
>
> returns a tuple
> id: "blabla"
>
> but not the part generated by the if(eq(1,1),Y,N) as found. In Solr 8.2
> the found field is returned:
> id: "blabla"
> found: "Y"
> To my best knowledge this is a fully generated field => it does not depend
> on the underlying collection data and the export handler. This was done to
> exclude any issues with this one.
> it states simply if 1=1 return Y else N
>
>
> On Fri, Nov 8, 2019 at 3:20 PM Joel Bernstein <joels...@gmail.com> wrote:
>
>> Before moving to a jira let's take a look at the underlying Solr queries
>> in the log. The Streaming Expressions just creates solr queries, in this
>> case queries to the /export handler. So when something is not working as
>> expected we want to strip away the streaming expression and debug the
>> actual queries that are being run.
>>
>> You can find the Solr queries that appear in the log after running the
>> expressions and then try running them outside of the expression as plain
>> Solr queries.
>>
>> You can also post the Solr queries to this thread and we discuss what the
>> logs say.
>>
>> In these cases the logs always are the way to debug whats going on.
>>
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>>
>> On Wed, Nov 6, 2019 at 4:14 PM Jörn Franke <jornfra...@gmail.com> wrote:
>>
>>> I created a JIRA for this:
>>> https://issues.apache.org/jira/browse/SOLR-13894
>>>
>>> On Wed, Nov 6, 2019 at 10:45 AM Jörn Franke <jornfra...@gmail.com>
>>> wrote:
>>>
>>>> I have checked now Solr 8.3 server in admin UI. Same issue.
>>>>
>>>> Reproduction:
>>>> select(search(testcollection,q=“test”,df=“Default”,defType=“edismax”,fl=“id”,
>>>> qt=“/export”, sort=“id asc”),id,if(eq(1,1),Y,N) as found)
>>>>
>>>> In 8.3 it returns only the id field.
>>>> In 8.2 it returns id,found field.
>>>>
>>>> Since found is generated by select (and not coming from the collection)
>>>> there must be an issue with select.
>>>>
>>>> Any idea why this is happening.
>>>>
>>>> Debug logs do not show any error and the expression is correctly
>>>> received by Solr.
>>>>
>>>> Thank you.
>>>>
>>>> Best regards
>>>>
>>>> > Am 05.11.2019 um 14:59 schrieb Jörn Franke <jornfra...@gmail.com>:
>>>> >
>>>> > Thanks I will check and come back to you. As far as I remember (but
>>>> have to check) the queries generated by Solr were correct
>>>> >
>>>> > Just to be clear the same thing works with Solr 8.2 server and Solr
>>>> 8.2 client.
>>>> >
>>>> > It show the odd behaviour with Solr 8.2 server and Solr 8.3 client.
>>>> >
>>>> >> Am 05.11.2019 um 14:49 schrieb Joel Bernstein <joels...@gmail.com>:
>>>> >>
>>>> >> I'll probably need some more details. One thing that's useful is to
>>>> look at
>>>> >> the logs and see the underlying Solr queries that are generated.
>>>> Then try
>>>> >> those underlying queries against the Solr index and see what comes
>>>> back. If
>>>> >> you're not seeing the fields with the plain Solr queries then we
>>>> know it's
>>>> >> something going on below streaming expressions. If you are seeing the
>>>> >> fields then it's the expressions themselves that are not handling
>>>> the data
>>>> >> as expected.
>>>> >>
>>>> >>
>>>> >> Joel Bernstein
>>>> >> http://joelsolr.blogspot.com/
>>>> >>
>>>> >>
>>>> >>>> On Mon, Nov 4, 2019 at 9:09 AM Jörn Franke <jornfra...@gmail.com>
>>>> wrote:
>>>> >>>
>>>> >>> Most likely this issue can bei also reproduced in the admin UI for
>>>> the
>>>> >>> streaming handler of a collection.
>>>> >>>
>>>> >>>>> Am 04.11.2019 um 13:32 schrieb Jörn Franke <jornfra...@gmail.com
>>>> >:
>>>> >>>>
>>>> >>>> Hi,
>>>> >>>>
>>>> >>>> I use streaming expressions, e.g.
>>>> >>>> Sort(Select(search(...),id,if(eq(1,1),Y,N) as found), by=“field A
>>>> asc”)
>>>> >>>> (Using export handler, sort is not really mandatory , I will
>>>> remove it
>>>> >>> later anyway)
>>>> >>>>
>>>> >>>> This works perfectly fine if I use Solr 8.2.0 (server + client). It
>>>> >>> returns Tuples in the form { “id”,”12345”, “found”:”Y”}
>>>> >>>>
>>>> >>>> However, if I use Solr 8.2.0 as server and Solr 8.3.0 as client
>>>> then the
>>>> >>> above statement only returns the id field, but not the found field.
>>>> >>>>
>>>> >>>> Questions:
>>>> >>>> 1) is this expected behavior, ie Solr client 8.3.0 is in this case
>>>> not
>>>> >>> compatible with Solr 8.2.0 and server upgrade to Solr 8.3.0 will
>>>> fix this?
>>>> >>>> 2) has the syntax for the above expression changed? If so how?
>>>> >>>> 3) is this not expected behavior and I should create a Jira for it?
>>>> >>>>
>>>> >>>> Thank you.
>>>> >>>> Best regards
>>>> >>>
>>>>
>>>

Reply via email to