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
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
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
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
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
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
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/
: 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
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