You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in Lucene 3.4 writer.addIndexes(new Directory[] { dir }) does not merge any more, so we must inoke maybeMerge after add dir to index. :)
public void loadFromIndex(BaseSearchIndex<R> index) throws IOException
{
// hao: open readOnly ram index reader
ZoieIndexReader<R> reader = index.openIndexReader();
if (reader == null)
return;
Directory dir = reader.directory();
// hao: delete docs in disk index
LongSet delDocs = _delDocs;
clearDeletes();
deleteDocs(delDocs);
// hao: merge the readOnly ram index with the disk index
IndexWriter writer = null;
try
{
writer = openIndexWriter(null, null);
writer.addIndexes(new Directory[] { dir });
writer.maybeMerge();
} finally
{
closeIndexWriter();
}
}
The text was updated successfully, but these errors were encountered:
in Lucene 3.4 writer.addIndexes(new Directory[] { dir }) does not merge any more, so we must inoke maybeMerge after add dir to index. :)
The text was updated successfully, but these errors were encountered: