1
私は3.0 APIを使用しています「アクションでのLucene」の第2版を通じて自分の道を働き始めたが、著者は、コードでは、以下の方法設定のLucene IndexWriterマックスフィールド
private IndexWriter getIndexWriter() throws CorruptIndexException, LockObtainFailedException, IOException {
return new IndexWriter(directory, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.Unlimited);
}
との基本的なINdexWriterを作成します下の例では、ライターの最大フィールド長を無制限に設定する方法がわかりませんが、現在のAPIに従って変更を加えました。私はちょうどint 1000を挿入しました。これは現在のAPIで完全に無制限になっていますか?
private IndexWriter getIndexWriter() throws CorruptIndexException, LockObtainFailedException, IOException {
IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_36,
new LimitTokenCountAnalyzer(new WhitespaceAnalyzer(Version.LUCENE_36), 1000));
return new IndexWriter(directory, iwc);
}
ありがとう、これは好奇心のためです。
ありがとう、javadocがシンクするためのいくつかの読書を取った – awfulHack