lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seneviratne_Yas...@emc.com
Subject indexing a large number of fields (and nesting them)
Date Mon, 12 Nov 2007 20:21:58 GMT
Hi,

I need to index tons of meta-data fields along with every document
(around 80 fields, mostly strings of 32 characters, some integers, bools
and dates too, a couple of strings are longer like 64 chars or 120).

Also it would be nice if there was a way to represent nested fields, and
query for them.  Right now nesting is handled by redundantly creating
fields.  And numbers and dates are normalized to strings during
indexing/querying.

So representing the following meta data:
<field A>
  <sub field a>
  <sub field b>
</field A>

in lucene looks like:
Document.add(new Field("fieldA", "value of entire field A section",
Field.Store.YES, Field.Index.TOKENIZED)

Document.add(new Field("fielda", "value of field a", Field.Store.YES,
Field.Index.TOKENIZED)

Document.add(new Field("fielda", "value of field b", Field.Store.YES,
Field.Index.TOKENIZED)

Is there a better way to do this?  I'd appreciate any suggestions.  

Thanks,
Yasoja


PS: Current implementation is on an older lucene 2.1 but moving to 2.2
or 2.3 is not a problem.



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