Hi Simon, > you mean where it is used? Look at the org.apache.lucene.codecs.Codec > class, it has a method: > > public abstract StoredFieldsFormat storedFieldsFormat(); > > which returns a stored fields format used to encode your stored fields > written by the index writer.
Thanks for your quick reply. So I have to change the return value of the method storedFieldsFormat to a custom CompressingStoredFieldsFormat. Then, I set the codec in the IndexWriterConfig for the IndexWriter. If this is correct, my problem is solved. Next question that comes up: If I have different IndexWriters writing in the same index with different codecs, is the codec for the fields somehow resolved for an IndexReader? Or does every instance of an IndexWriter change the stored fields to its codec when committing and closing the index? Regards, Bernd 2013/1/24 Simon Willnauer <simon.willna...@gmail.com>: > Hi Bernd, > > > On Thu, Jan 24, 2013 at 9:30 AM, Bernd Müller <belu...@googlemail.com> wrote: >> Hello, >> >> In the lucene 4.1 release, there was introduced a compression for >> stored fields as described here: >> https://issues.apache.org/jira/browse/LUCENE-4226 > > yeah that is correct, its the new default. if you use Lucene 4.1 this > will be enabled and used by default for all stored fields. > there is also a blog post about the stored fields format > http://blog.jpountz.net/post/33247161884/efficient-compressed-stored-fields-with-lucene >> >> In the java-docs, I don't really find any documentation about the >> application of StoredFieldsFormat and CompressingStoredFieldsFormat. > > you mean where it is used? Look at the org.apache.lucene.codecs.Codec > class, it has a method: > > public abstract StoredFieldsFormat storedFieldsFormat(); > > which returns a stored fields format used to encode your stored fields > written by the index writer. >> >> Where can I apply the field compression and provide parameters for the >> compression level? > > Look at Lucene41Codec this is where the field format is created. you > can use your own codec (subclass codec) and plug it into the > IndexWriterConfig > to apply your own settings. >> >> The documentation about the 4.0 and 4.1 releases with examples about >> the changes aren't well documented. The wiki seems a little bit >> outdated. For lucene 2 and 3, I have read the Manning-Series Lucene in >> Action that doesn't have any successor so far for the lucene 4 >> release. >> >> Does there exist any further documentation, especially with examples >> for the new releases? > > I don't think we have examples on the wiki for that stuff but we should I > guess. > > simon >> >> Regards, >> >> Bernd >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org