Mercurial Hosting > luan
comparison src/goodjava/lucene/logging/LoggingIndexWriter.java @ 1539:c27dc6af87ca
remove nextId
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 06 Sep 2020 11:35:30 -0600 |
parents | 634f6765830e |
children | 35601f15ecc3 |
comparison
equal
deleted
inserted
replaced
1538:634f6765830e | 1539:c27dc6af87ca |
---|---|
15 import java.util.Random; | 15 import java.util.Random; |
16 import java.util.concurrent.TimeUnit; | 16 import java.util.concurrent.TimeUnit; |
17 import org.apache.lucene.document.Document; | 17 import org.apache.lucene.document.Document; |
18 import org.apache.lucene.index.DirectoryReader; | 18 import org.apache.lucene.index.DirectoryReader; |
19 import org.apache.lucene.index.IndexReader; | 19 import org.apache.lucene.index.IndexReader; |
20 import org.apache.lucene.index.IndexWriter; | |
20 import org.apache.lucene.index.Term; | 21 import org.apache.lucene.index.Term; |
21 import org.apache.lucene.index.LiveIndexWriterConfig; | |
22 import org.apache.lucene.search.IndexSearcher; | 22 import org.apache.lucene.search.IndexSearcher; |
23 import org.apache.lucene.search.Query; | 23 import org.apache.lucene.search.Query; |
24 import org.apache.lucene.search.MatchAllDocsQuery; | 24 import org.apache.lucene.search.MatchAllDocsQuery; |
25 import org.apache.lucene.search.TopDocs; | 25 import org.apache.lucene.search.TopDocs; |
26 import org.apache.lucene.search.PrefixQuery; | 26 import org.apache.lucene.search.PrefixQuery; |
78 } | 78 } |
79 } | 79 } |
80 newLogs(); | 80 newLogs(); |
81 } | 81 } |
82 | 82 |
83 public Directory getDirectory() { | 83 public IndexWriter getLuceneIndexWriter() { |
84 return indexWriter.getDirectory(); | 84 return indexWriter.getLuceneIndexWriter(); |
85 } | |
86 | |
87 public LiveIndexWriterConfig getLuceneConfig() { | |
88 return indexWriter.getLuceneConfig(); | |
89 } | 85 } |
90 | 86 |
91 private void setLog() throws IOException { | 87 private void setLog() throws IOException { |
92 if( log != null ) | 88 if( log != null ) |
93 log.close(); | 89 log.close(); |