lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: grouping in fq
Date Tue, 11 May 2010 19:08:13 GMT
> How do I implement a requirement like "if category is xyz,
> the price should
> be greater than 100 for inclusion in the result set".
> 
> In other words, the result set should contain:
> - all matching documents with category value not xyz
> - all matching documents with category value xyz and price
> > 100
> 
> I was thinking something like fq=(-category:xyz OR
> (category:xyz AND price >
> 100))
> 
> this doesn't seem to work. Any suggestions will be greatly
> appreciated.

Something like this should work:
(+category:xyz +price:[100 TO *]) (+*:* -category:xyz)

and your price field must be one of the trie based fields. 


      

Mime
View raw message