You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Karol Sikora <ka...@laboratorium.ee> on 2013/02/08 01:50:47 UTC

LocalParam tag does not work when is placed in brackets

Hi all,

I`m struggiling with strange local params behaviour when {!tag=somethig} 
is in brackets term.
case:
facet.field={!ex=d0feea8}category&fq={!tag=d0feea8}category:"5" AND 
type:DOCUMENT
works as I expected, but:
facet.field={!ex=d0feea8}category&fq=({!tag=d0feea8}category:"5" OR 
otherField:"otherValue") AND type:DOCUMENT
not.
There is a special syntax for dealing with such cases?

Thanks in advance for your help.

-- 
  
Karol Sikora


RE: LocalParam tag does not work when is placed in brackets

Posted by Michael Ryan <mr...@moreover.com>.
I'm pretty sure the local params have to be at the very start of the query. But you should be able to do this with nested queries. Try this...

fq=_query_:"{!tag=d0feea8}category:\"5\" OR otherField:\"otherValue\"" AND type:DOCUMENT

-Michael

-----Original Message-----
From: Karol Sikora [mailto:karol.sikora@laboratorium.ee] 
Sent: Thursday, February 07, 2013 7:51 PM
To: solr-user@lucene.apache.org
Subject: LocalParam tag does not work when is placed in brackets

Hi all,

I`m struggiling with strange local params behaviour when {!tag=somethig} is in brackets term.
case:
facet.field={!ex=d0feea8}category&fq={!tag=d0feea8}category:"5" AND type:DOCUMENT works as I expected, but:
facet.field={!ex=d0feea8}category&fq=({!tag=d0feea8}category:"5" OR
otherField:"otherValue") AND type:DOCUMENT not.
There is a special syntax for dealing with such cases?

Thanks in advance for your help.

-- 
  
Karol Sikora