Unable to tag queries (q) in SOLR >= 7.2

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

Unable to tag queries (q) in SOLR >= 7.2

Rodland Fredrik
Hi.

I seems SOLR-11501 may have changed more than just the ability to control the query parser set through {!queryparser}.  We tag our queries to provide facets both with and without the query in the same request, just as tagging in fq described here: https://lucene.apache.org/solr/guide/6_6/faceting.html#Faceting-TaggingandExcludingFilters

After upgrading to 7.2 this does not work anymore (for the q-parameter) using edismax.  We’ve tried to add the uf-paramter:

select?q={!tag%3Dmytag}house&debug=query&rows=0&uf=query&df=edismax

But this only result in q being allowed through, but not parsed - i.e.:
"+(+DisjunctionMaxQuery(((synrank80:tagmytagingeniør)^8.0 | (stemrank40:tagmytagingeniør)^4.0…

Does anybody have any experience or tips for enabling tagging of queries for SOLR >= 7.2?

Regards

Fredrik
Reply | Threaded
Open this post in threaded view
|

Re: Unable to tag queries (q) in SOLR >= 7.2

david.w.smiley@gmail.com
Hi Frederik,

In your example, I think you may have typed it manually since there are
mistakes like df=edismax which I think you meant defType=edismax.  Any way,
assuming you need local-param syntax in 'q' (for tagging or whatever other
reason), then this means you must specify the query parser there and *not*
defType (don't set defType or set it to "lucene" which is the default).

~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley


On Tue, Apr 30, 2019 at 8:17 AM Fredrik Rodland <[hidden email]> wrote:

> Hi.
>
> I seems SOLR-11501 may have changed more than just the ability to control
> the query parser set through {!queryparser}.  We tag our queries to provide
> facets both with and without the query in the same request, just as tagging
> in fq described here:
> https://lucene.apache.org/solr/guide/6_6/faceting.html#Faceting-TaggingandExcludingFilters
>
> After upgrading to 7.2 this does not work anymore (for the q-parameter)
> using edismax.  We’ve tried to add the uf-paramter:
>
> select?q={!tag%3Dmytag}house&debug=query&rows=0&uf=query&df=edismax
>
> But this only result in q being allowed through, but not parsed - i.e.:
> "+(+DisjunctionMaxQuery(((synrank80:tagmytagingeniør)^8.0 |
> (stemrank40:tagmytagingeniør)^4.0…
>
> Does anybody have any experience or tips for enabling tagging of queries
> for SOLR >= 7.2?
>
> Regards
>
> Fredrik
Reply | Threaded
Open this post in threaded view
|

Re: Unable to tag queries (q) in SOLR >= 7.2

Rodland Fredrik
Thank you for a quick response David.

Your suggestion works like a charm.

(And you were of course right about the query being manually edited).

Regards,

Fredrik

> On 30 Apr 2019, at 14:48, David Smiley <[hidden email]> wrote:
>
> Hi Frederik,
>
> In your example, I think you may have typed it manually since there are
> mistakes like df=edismax which I think you meant defType=edismax.  Any way,
> assuming you need local-param syntax in 'q' (for tagging or whatever other
> reason), then this means you must specify the query parser there and *not*
> defType (don't set defType or set it to "lucene" which is the default).
>
> ~ David Smiley
> Apache Lucene/Solr Search Developer
> http://www.linkedin.com/in/davidwsmiley
>
>
> On Tue, Apr 30, 2019 at 8:17 AM Fredrik Rodland <[hidden email]> wrote:
>
>> Hi.
>>
>> I seems SOLR-11501 may have changed more than just the ability to control
>> the query parser set through {!queryparser}.  We tag our queries to provide
>> facets both with and without the query in the same request, just as tagging
>> in fq described here:
>> https://lucene.apache.org/solr/guide/6_6/faceting.html#Faceting-TaggingandExcludingFilters
>>
>> After upgrading to 7.2 this does not work anymore (for the q-parameter)
>> using edismax.  We’ve tried to add the uf-paramter:
>>
>> select?q={!tag%3Dmytag}house&debug=query&rows=0&uf=query&df=edismax
>>
>> But this only result in q being allowed through, but not parsed - i.e.:
>> "+(+DisjunctionMaxQuery(((synrank80:tagmytagingeniør)^8.0 |
>> (stemrank40:tagmytagingeniør)^4.0…
>>
>> Does anybody have any experience or tips for enabling tagging of queries
>> for SOLR >= 7.2?
>>
>> Regards
>>
>> Fredrik