Re: Different behavior when using function queries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Different behavior when using function queries

Erik Hatcher-4
If you have no documents in the results, there’s nothing to attach the function result to.    `fl` is field list of fields to show in matched documents.   You have no matches documents.

    Erik

> On Mar 18, 2019, at 07:55, Ashish Bisht <[hidden email]> wrote:
>
> Can someone please explain the below behavior.For different q parameter
> function query response differs although function queries are same
>
> http://<BOX-1>:8983/solr/SCSpell/select?q="*market
> place*"&defType=edismax&qf=spellcontent&wt=json&rows=1&fl=internet_of_things:if(exists(query({!edismax
> v='"internet of
> things"'})),true,false),instant_of_things:if(exists(query({!edismax
> v='"instant of things"'})),true,false)
>
> Response contains function query results
>
> "response":{"numFound":80,"start":0,"docs":[
>      {
>        "internet_of_things":false,
>        "instant_of_things":false}]
>  }}
>
> wheras for different q
>
> http://<Box-1>:8983/solr/SCSpell/select?q="*intent of
> things*"&defType=edismax&qf=spellcontent&wt=json&rows=1&fl=internet_of_things:if(exists(query({!edismax
> v='"internet of
> things"'})),true,false),instant_of_things:if(exists(query({!edismax
> v='"instant of things"'})),true,false)
>
> Response doesnot contain function query results
>
> "response":{"numFound":0,"start":0,"docs":[]
>  }}
>
>
> From the results it looks like if the results of q doesn't yield result
> function queries don't work.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html