Hi Erik, thanks for your reply,

I had read this page.  But I'm not using the "NOT" operator,  I'm using 
the "-" operator.  I'm assuming there is a subtle difference between them in 
that NOT qualifies something else, hence needs 2 terms.  Isn't the "-" 
operator supposed to be a complement to the "+" operator, ie. excludes 
something rather than requiring it ?

thanks
Karen



On Monday 14 January 2008 15:14:05 Erick Erickson wrote:
> Have you seen this page?
> http://lucene.apache.org/java/docs/queryparsersyntax.html
>
> From that page:
> Note: The NOT operator cannot be used with just one term. For example, the
> following search will return no results:
> NOT "jakarta apache"
>
>
> Erick
>
> On Jan 14, 2008 9:30 AM, Karen Loughran <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > We are indexing different types of documents, some with certain fields
> > set and
> > some without, some fields sometimes in both.
> >
> > If a particular field is missing in a newly added record, I would have
> > expected the query:
> >
> > field_name:(-null)
> >
> > not to return this particular record in the response, ie, I'm assuming
> > the field is set to null.
> >
> > But the response we see includes empty docs:
> >
> > ......
> > ....
> > ..
> > <doc>
> >  </doc>
> > <doc>
> >  </doc>
> > <doc>
> >  </doc>
> > etc, etc....
> > ..
> > ....
> >
> > Can someone explain why field_name:(-null) returns the records where
> > field_name is missing ?
> >
> > We note that if we do the range operation we can get a response without
> > the
> > records with no field_name:
> >
> > field_name:[* TO *]
> >
> > Many thanks
> > Karen


Reply via email to