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 cnyee <ye...@gmail.com> on 2011/05/12 07:09:14 UTC

Facet filter: how to specify OR expression?

Hi,

Is there anyway to specify an 'OR' expression for facet filter? 
For example docType="pdf" or docType="txt"

Many thanks in advance.
Yee

--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2930570.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by cnyee <ye...@gmail.com>.
It works. Many thanks.

--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2930783.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by cnyee <ye...@gmail.com>.
Oh I see....

I was wrong in using (pdf or txt). It worked, but have different meanings
altogether from (pdf OR txt).

Thanks a lot for your help.

Best regards,
Yee

--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2931347.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by Grijesh <pi...@gmail.com>.
"or" is not any operator "OR", "AND", "NOT" all are caps should be used as
operator 

-----
Thanx: 
Grijesh 
www.gettinhahead.co.in 
--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2931318.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by rajini maski <ra...@gmail.com>.
The input parameter assigning to the field "tint" is type string ("or").  It
is trying to assign tint=or which is incorrect. So the respective exception
has occurred.

On Thu, May 12, 2011 at 4:10 PM, cnyee <ye...@gmail.com> wrote:

> The exception says:
>
> java.lang.NumberFormatExcepton: for input string "or"
>
> The field type is:
> <fieldType name="tint" class="solr.TrieIntField" precisionStep="8"
> omitNorms="true" positionIncrementGap="0"/>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2931282.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Facet filter: how to specify OR expression?

Posted by cnyee <ye...@gmail.com>.
The exception says:

java.lang.NumberFormatExcepton: for input string "or"

The field type is:
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8"
omitNorms="true" positionIncrementGap="0"/>



--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2931282.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by Grijesh <pi...@gmail.com>.
No, OR operator should work for any data type

-----
Thanx: 
Grijesh 
www.gettinhahead.co.in 
--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2930915.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by cnyee <ye...@gmail.com>.
I have another facet that is of type integer and it gave an exception.

Is it true that the field has to be of type string or text for the OR
expression to work?



--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2930863.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet filter: how to specify OR expression?

Posted by Grijesh <pi...@gmail.com>.
How about fq=docType:(pdf OR txt)

-----
Thanx: 
Grijesh 
www.gettinhahead.co.in 
--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-filter-how-to-specify-OR-expression-tp2930570p2930648.html
Sent from the Solr - User mailing list archive at Nabble.com.