Hi Sebastiano,
I'm trying to write to quasi-succint index writer, and I'm getting the
following error while writing out the positions:
Caused by: java.lang.IllegalArgumentException: Too large prefix sum:
16926 >= 15425
at
it.unimi.di.big.mg4j.index.QuasiSuccinctIndexWriter$Accumulator.add(QuasiSuccinctIndexWriter.java:447)
at
it.unimi.di.big.mg4j.index.QuasiSuccinctIndexWriter.writeDocumentPositions(QuasiSuccinctIndexWriter.java:700)
I've tried to understand what the problem may be, but it's not clear to
me from just reading the code. I found some comments about the positions
accumulator being strict, which means that zeros are not stored? I'm not
sure what that means - zero positions are clearly valid, so it must be
something else...
In case it helps, this is how I create the index writer:
QuasiSuccinctIndexWriter indexWriter = new QuasiSuccinctIndexWriter(
IOFactory.FILESYSTEM_FACTORY,
mg4jBasename,
documentPointer,
Fast.mostSignificantBit(QuasiSuccinctIndex.DEFAULT_QUANTUM),
QuasiSuccinctIndexWriter.DEFAULT_CACHE_SIZE,
CompressionFlags.DEFAULT_QUASI_SUCCINCT_INDEX,
ByteOrder.nativeOrder());
When indexing some very simple documents, the error does not occur - so
it's not something that's systematically wrong. My problem is that I
don't understand the semantics of the error message, so I don't know
where to look.
Thanks,
Valentin