: If I am finding the values of a long field for a single numeric field, I : just do: : : DocValues.getNumeric(contex.reader(), "myField").get(docNumber). This : returns the value of the field and everything is good. : : However, my field is a multi-valued long field. So, I need to do: : : DocValues.getSortedSet(contex.reader(), "myField") : This returns a SortedSetDocValues. And now I am a bit lost. I want to
I haven't looked into this closely, but isn't what you want just DocValues.getSortedNumeric() ? : As a followup question, I am doing this for a PostFiter. So, : DeletagtingCollector.collect(int doc). The value of doc always seems to be : 0. So, I am assuming this is not the doc ID. Is this the index of the : reader at it's current position? It shouldn't always be 0 -- it should be the docId relative the current (Leaf) reader context ... so if you have a lot of segments containing only a single document, then it would always be 0. If you always use the current LeafReaderContext to fetch the DocValues (ie: you can load the DocValues in doSetNextReader() and re-use until the next doSetNextReader() or finish()) then the docId collected and the docId you use to lookup the docValues can be identical, and you can ignore the details of where/how the current reader context is in relation to the entire index (ie: the docBase) -Hoss http://www.lucidworks.com/