lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mordo, Aviran (EXP N-NANNATEK)" <aviran.mo...@lmco.com>
Subject RE: searching for empty field
Date Mon, 11 Jun 2007 13:57:09 GMT
AFAIK there is no strait way of doing that, however you can create
another field (field4) which can indicate if field2 exists.

HTH

Aviran
http://www.aviransplace.com
http://shaveh.co.il 

-----Original Message-----
From: Dino [mailto:dckorah@gmail.com] 
Sent: Monday, June 11, 2007 9:54 AM
To: 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 like
	Field1:{yes|no}
	[Field2:{val_1[,val_2]... }]
	Field3:val_X


Here the Field2 is the one that I am having trouble with.

Currently when I get a document with a bunch of Field:Value metadata, I
run them in a loop and create Field object relying on the metadata
input. That way the data source decides the number of fields attached to
a particular document. Fields like Field2 will be left out if it didn't
appear in the input.

So if I get a document like 

	Field1:yes
	Field3:val_X
	~~~~~~~~~~~~~~~~~~~
	DATA DATA DATA DATA ..... DATA

The document in the index wouldn't have field2 attached to it.

Now my question is how will I search for all the documents with *empty*
Field2?

Cheerio



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message