>> (+category:xyz +price:[100 TO *]) -category:xyz this one doesn't seem to work (I'm not using a price field, but a text field -- using price field here just for example).
Below are some other variations I tried: (+category:xyz +price:[100 TO *]) -category:xyz -- zero results (+category:xyz +price:[100 TO *]) (-category:xyz) -- returns only results with category xyz and price >=100 (+category:xyz +price:[100 TO *]) (*:* -category:xyz) -- returns results with category xyz and price >=100 AND results where category!=xyz On Wed, May 12, 2010 at 2:54 PM, Lance Norskog <goks...@gmail.com> wrote: > Because leading negative clauses don't work. The (*:* AND x) syntax > means "select everything AND also select x". > > You could also do > (+category:xyz +price:[100 TO *]) -category:xyz > > On Tue, May 11, 2010 at 12:36 PM, Satish Kumar > <satish.kumar.just.d...@gmail.com> wrote: > > thanks Ahmet. > > > > (+category:xyz +price:[100 TO *]) (+*:* -category:xyz) > > why do we have to use (+*:* -category:xyz) instead of -category:xyz? > > > > > > > > On Tue, May 11, 2010 at 3:08 PM, Ahmet Arslan <iori...@yahoo.com> wrote: > > > >> > 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. > >> > >> > >> > >> > > > > > > -- > Lance Norskog > goks...@gmail.com >