Dev Time: Looking at a Plaintext Lucene Index Starting with Lucene 4 the format for these files can...

Please Visit: http://ift.tt/1ajReyV



Dev Time: Looking at a Plaintext Lucene Index



Starting with Lucene 4 the format for these files can be configured using the SimpleTextCodec (Link->http://ift.tt/1rvJEiD) that can be used to write the files in plaintext for learning and debugging purposes.

To configure the Codec you just set it on the IndexWriterConfig:

StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);

IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_40, analyzer);

// recreate the index on each execution

config.setOpenMode(IndexWriterConfig.OpenMode.CREATE);

config.setCodec(new SimpleTextCodec());

http://ift.tt/1v6L4Ok

http://ift.tt/1rvJGXI



Dev Time: Looking at a Plaintext Lucene Index







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1rvJEyX

via LifeLong Community

No comments:

Post a Comment