Hi Guys,
Could you give me advice how to deal with Lucene 3.0 with 2.4 indexes
that contain compressed data.
Our case is following - we have code like this:
Field.Store fieldStored = storedFieldsSet.contains(fieldName) ?
(fieldValue.length() >= COMPRESS_THRESHOLD ? Field.Store.COMPRESS :
Field.Store.YES) : Field.Store.NO;
Field.Index fieldIndexed = indexedFieldsSet.contains(fieldName) ?
Field.Index.ANALYZED : Field.Index.NO;
doc.add(new Field(fieldName, fieldValue, fieldStored, fieldIndexed));
So for one and the same field some values are compressed in the indexes
other values are not.
Reading Lucene documentation I understand that all the values for some
field should be either compressed or not compressed OR we should somehow
keep which values for which fields are compressed. If this is so it
would be very difficult to migrate our system to Lucene 3.0 without need
of re indexing.
If I am not right could you tell me please:
1. How to read these indexes (created with the code above with Lucene
2.4) with Lucene 3.0? I mean when fetching field values how to know when
to use CompressionTools.decompressString(..) and when to skip it?
2. Is there possibility in Lucene 3.0 again to compress values of some
docs for certain field and for other docs the values for the same field
not to be compressed?
Cheers,
Ivan
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org