Not just that.  I'm looking for things which match either red or yellow or
green, but do NOT match ANY other color.  I can probably drop the
requirement related to having no color.


On Sat, Sep 27, 2014 at 3:28 PM, Yonik Seeley <yo...@heliosearch.com> wrote:

> On Sat, Sep 27, 2014 at 2:52 PM, White, Bill <bwh...@ptfs.com> wrote:
> > Hello,
> >
> > I've attempted to figure this out from reading the documentation but
> > without much luck.  I looked for a comprehensive query syntax
> specification
> > (e.g., with BNF and a list of operator semantics) but I'm unable to find
> > such a document (does such a thing exist? or is the syntax too much of a
> > moving target?)
> >
> > I'm using 4.6.1, if that makes a difference, though upgrading is an
> option
> > if it necessary to make this work.
> >
> > I've got a multiValued field "color", which describes the colors of item
> in
> > the database.  Items can have zero or more colors.  What I want is to be
> > able to filter out all hits that contain colors not within a constraining
> > list, i.e., something like
> >
> > NOT (color NOT IN ("red","yellow","green")).
> >
> > So the following would be passed by the filter:
> > (no value for 'color')
> > color: red
> > color: red, color: green
> >
> > whereas these would be excluded:
> > color: red, color: blue
> > color: magenta
>
> You're looking for things that either match red, yellow, or green, or
> have no color:
>
> color:(red yellow green) OR (*:* -color:*)
>
> -Yonik
> http://heliosearch.org - native code faceting, facet functions,
> sub-facets, off-heap data
>

Reply via email to