Update rocksdb and lucene, add serialization errors details
This commit is contained in:
parent
fa865a654d
commit
a5502af24a
4
pom.xml
4
pom.xml
|
@ -13,8 +13,8 @@
|
|||
<revision>0-SNAPSHOT</revision>
|
||||
<dbengine.ci>false</dbengine.ci>
|
||||
<micrometer.version>1.10.4</micrometer.version>
|
||||
<lucene.version>9.8.0</lucene.version>
|
||||
<rocksdb.version>8.8.1</rocksdb.version>
|
||||
<lucene.version>9.9.1</lucene.version>
|
||||
<rocksdb.version>8.9.1</rocksdb.version>
|
||||
<junit.jupiter.version>5.9.0</junit.jupiter.version>
|
||||
<data.generator.version>1.0.25</data.generator.version>
|
||||
</properties>
|
||||
|
|
|
@ -147,7 +147,7 @@ public class DatabaseMapDictionary<T, U> extends DatabaseMapDictionaryDeep<T, U,
|
|||
} catch (SerializationException ex) {
|
||||
throw ex;
|
||||
} catch (Exception ex) {
|
||||
throw new SerializationException("Failed to serialize value");
|
||||
throw new SerializationException("Failed to serialize value", ex);
|
||||
}
|
||||
return valBuf.asList();
|
||||
}
|
||||
|
|
|
@ -82,6 +82,12 @@ public class CheckIndexInput extends IndexInput {
|
|||
public RandomAccessInput randomAccessSlice(long offset, long length) throws IOException {
|
||||
var ras = input.randomAccessSlice(offset, length);
|
||||
return new RandomAccessInput() {
|
||||
@Override
|
||||
public long length() {
|
||||
checkThread();
|
||||
return ras.length();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte readByte(long pos) throws IOException {
|
||||
checkThread();
|
||||
|
|
|
@ -10,6 +10,7 @@ import it.cavallium.dbengine.utils.SimpleResource;
|
|||
import java.util.Comparator;
|
||||
import java.util.stream.Stream;
|
||||
import org.apache.lucene.search.FieldComparator;
|
||||
import org.apache.lucene.search.Pruning;
|
||||
import org.apache.lucene.search.Sort;
|
||||
import org.apache.lucene.search.SortField;
|
||||
import org.apache.lucene.search.TotalHits;
|
||||
|
@ -115,7 +116,7 @@ public interface FullDocs<T extends LLDoc> extends ResourceIterable<T> {
|
|||
|
||||
for (int compIDX = 0; compIDX < sortFields.length; ++compIDX) {
|
||||
SortField sortField = sortFields[compIDX];
|
||||
comparators[compIDX] = sortField.getComparator(1, compIDX == 0);
|
||||
comparators[compIDX] = sortField.getComparator(1, Pruning.NONE);
|
||||
reverseMul[compIDX] = sortField.getReverse() ? -1 : 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import it.cavallium.dbengine.utils.LFSR;
|
|||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import org.apache.lucene.search.FieldComparator;
|
||||
import org.apache.lucene.search.FieldComparatorSource;
|
||||
import org.apache.lucene.search.Pruning;
|
||||
|
||||
public class RandomFieldComparatorSource extends FieldComparatorSource {
|
||||
|
||||
|
@ -14,7 +15,7 @@ public class RandomFieldComparatorSource extends FieldComparatorSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public FieldComparator<?> newComparator(String fieldName, int numHits, boolean enableSkipping, boolean reversed) {
|
||||
public FieldComparator<?> newComparator(String fieldname, int numHits, Pruning pruning, boolean reversed) {
|
||||
return new RandomFieldComparator(rand.iterator(), numHits);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ public class ShardIndexSearcher extends IndexSearcher {
|
|||
throw new NoSuchElementException("node=" + nodeID);
|
||||
}
|
||||
for (Term term : terms) {
|
||||
final TermStates ts = TermStates.build(s.getIndexReader().getContext(), term, true);
|
||||
final TermStates ts = TermStates.build(s, term, true);
|
||||
if (ts.docFreq() > 0) {
|
||||
stats.put(term, s.termStatistics(term, ts.docFreq(), ts.totalTermFreq()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue