(reverse-index) Don't always POST
This commit is contained in:
parent
6308a8dfcd
commit
9e26109e36
@ -37,13 +37,15 @@ public class ReverseIndexReader {
|
|||||||
logger.info("Switching reverse index");
|
logger.info("Switching reverse index");
|
||||||
|
|
||||||
this.words = LongArrayFactory.mmapForReadingShared(words);
|
this.words = LongArrayFactory.mmapForReadingShared(words);
|
||||||
this.documents = LongArrayFactory.mmapForReadingShared (documents);
|
this.documents = LongArrayFactory.mmapForReadingShared(documents);
|
||||||
|
|
||||||
wordsBTreeReader = new BTreeReader(this.words, ReverseIndexParameters.wordsBTreeContext, 0);
|
wordsBTreeReader = new BTreeReader(this.words, ReverseIndexParameters.wordsBTreeContext, 0);
|
||||||
wordsDataOffset = wordsBTreeReader.getHeader().dataOffsetLongs();
|
wordsDataOffset = wordsBTreeReader.getHeader().dataOffsetLongs();
|
||||||
|
|
||||||
if (getClass().desiredAssertionStatus()) {
|
if (getClass().desiredAssertionStatus()) {
|
||||||
Executors.newSingleThreadExecutor().execute(this::selfTest);
|
if (Boolean.getBoolean("index-self-test")) {
|
||||||
|
Executors.newSingleThreadExecutor().execute(this::selfTest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user