2.12 Debugging indexing
If you ever need to debug Lucene’s index-writing process, remember that you can get Lucene to output information about its indexing operations by calling IndexWriter’s setInfoStream method, passing in a PrintStream such as System.out:
from lucene in action
If you ever need to debug Lucene’s index-writing process, remember that you can get Lucene to output information about its indexing operations by calling IndexWriter’s setInfoStream method, passing in a PrintStream such as System.out:
IndexWriter writer = new IndexWriter(dir, analyzer,
IndexWriter.MaxFieldLength.UNLIMITED);
writer.setInfoStream(System.out);
This reveals detailed diagnostic information about segment flushes and merges, as
shown here, and may help you tune indexing parameters described earlier in the
chapter. If you’re experiencing an issue during indexing, something you may believe
to be a bug in Lucene, and you take your issue to the Lucene user’s list at Apache, the
first request you’ll get back is someone asking you to post the output from setting
infoStream. It will look something like this: from lucene in action
댓글 없음:
댓글 쓰기