Re: Searching for Empty Field

2011-07-15 Thread Trejkaz
On Fri, Jul 15, 2011 at 4:45 PM, Uwe Schindler wrote: > Hi, > >> The crappy thing is that to actually detect if there are any tokens in the >> field >> you need to make a TokenStream which can be used to read the first token >> and then rewind again.  I'm not sure if there is such a thing in Luce

RE: Searching for Empty Field

2011-07-14 Thread Uwe Schindler
Hi, > The crappy thing is that to actually detect if there are any tokens in the > field > you need to make a TokenStream which can be used to read the first token > and then rewind again. I'm not sure if there is such a thing in Lucene at the > moment. We had to write it ourselves but we were

Re: Searching for Empty Field

2011-07-14 Thread Trejkaz
On Fri, Jul 15, 2011 at 10:02 AM, Trieu, Jason T wrote: > Hi all, > > I read postings about searching for empty field with but did not find any > cases of successful search using query language syntax itself(-myField:[* TO > *] for example). We have been using: -myField:* Yo

Re: Searching for Empty Field

2011-07-14 Thread findbestopensource
t; I read postings about searching for empty field with but did not find any > cases of successful search using query language syntax itself(-myField:[* TO > *] for example). I saw that other techniques like using a filter were used > to get around this syntax string limitation. Giv

Searching for Empty Field

2011-07-14 Thread Trieu, Jason T
Hi all, I read postings about searching for empty field with but did not find any cases of successful search using query language syntax itself(-myField:[* TO *] for example). I saw that other techniques like using a filter were used to get around this syntax string limitation. Given that

Re: searching for empty field

2007-06-11 Thread Erik Hatcher
On Jun 11, 2007, at 9:53 AM, Dino wrote: Now my question is how will I search for all the documents with *empty* Field2? You can search for "-field2:[* TO *] AND *:*" essentially. With Solr, the *:* isn't needed, but is with pure Lucene to ensure a positive query also. Erik

Re: searching for empty field

2007-06-11 Thread Erick Erickson
You don't as far as I know. One solution that has been suggested is to always index field2, but with a noop value. This works pretty well if you choose a value you'd never search for, say xzxzxzxzxzxzxzx. Then you can search field2 for that special value to get the *empty* case. Best Erick On 6/

RE: searching for empty field

2007-06-11 Thread Mordo, Aviran (EXP N-NANNATEK)
: java-user@lucene.apache.org Subject: searching for empty field Hi Everyone, I have a lucene index were I add a document with a set of metadata. In my system, all the fields in the metadata set needn't be there all the time for a given document. Say if I am expecting a metadata set

searching for empty field

2007-06-11 Thread Dino
Hi Everyone, I have a lucene index were I add a document with a set of metadata. In my system, all the fields in the metadata set needn't be there all the time for a given document. Say if I am expecting a metadata set like Field1:{yes|no} [Field2:{val_1[,val_2]... }] Fiel