field:(-null) returns records where field was not specified

2008-01-14 Thread Karen Loughran
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 respo

Re: field:(-null) returns records where field was not specified

2008-01-14 Thread Erick Erickson
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 PRO

Re: field:(-null) returns records where field was not specified

2008-01-14 Thread Karen Loughran
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 th

RE: field:(-null) returns records where field was not specified

2008-01-14 Thread Lance Norskog
find records with empty fields. Lance Norskog -Original Message- From: Karen Loughran [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 7:51 AM To: solr-user@lucene.apache.org Cc: Erick Erickson Subject: Re: field:(-null) returns records where field was not specified Hi Erik, thanks fo

RE: field:(-null) returns records where field was not specified

2008-01-14 Thread Chris Hostetter
Several things in this thread should be clarified (note: order of quotations munged for clarity)... : 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

Re: field:(-null) returns records where field was not specified

2008-01-15 Thread Karen Loughran
Thanks Chris, this is useful, we can you the query format you suggest, Karen On Tuesday 15 January 2008 01:13:14 Chris Hostetter wrote: > Several things in this thread should be clarified (note: order of > quotations munged for clarity)... > > : I had read this page. But I'm not using the "NOT"