apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.59k stars 1.01k forks source link

FSTOrdPostingsFormat doesnt support ord() [LUCENE-5888] #6950

Open asfimport opened 10 years ago

asfimport commented 10 years ago

This is sort of the point of this PF, but it doesn't implement ord() or seek(ord).


Migrated from LUCENE-5888 by Robert Muir (@rmuir), 1 vote

asfimport commented 10 years ago

Robert Muir (@rmuir) (migrated from JIRA)

I looked at trying to fix this: a big missing piece I think is to be able to seek the FSTEnum by output?

If we can do this, we can fix the stupidity in MemoryDocValues and Lucene42DocValues as well: they currently find-by-output separately (the Util method), then seek the enum to the bytes :(

asfimport commented 10 years ago

Robert Muir (@rmuir) (migrated from JIRA)

Maybe a solution here is to make a OrdFSTEnum that extends BytesRefFSTEnum<Long> ? Util.getByOutput is hardcoded at Long, so to avoid generics hell we can just have this subclass that solves the issue for our terms dictionaries/docvalues.