You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Yonik Seeley <ys...@gmail.com> on 2016/10/17 17:41:18 UTC

plan for getGlobalOrds->LongValues

OrdinalMap.getGlobalOrds currently returns LongValues, which
was deprecated by the cutover to DV iterators (LongValues now extends
LegacyNumericDocValues).

An iterator API makes no sense for global ords, which are inherently
random-access since they are not based on docids.

It seems like we should either:
1) create a new LongValues abstract class with essentially the old
API:  long get(int index)
2) create a LongValues interface that can be optionally implemented by
classes wishing to expose a random access API

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: plan for getGlobalOrds->LongValues

Posted by Adrien Grand <jp...@gmail.com>.
I agree it should not deprecated. Random access is still useful for global
ordinals, but also some parts of doc values formats like terms dictionaries
of SORTED(_SET) doc values. I think we should remove the deprecation
annotation and also make it its own class rather than extending
NumericDocValues. I can work on it.

Le lun. 17 oct. 2016 à 19:41, Yonik Seeley <ys...@gmail.com> a écrit :

> OrdinalMap.getGlobalOrds currently returns LongValues, which
> was deprecated by the cutover to DV iterators (LongValues now extends
> LegacyNumericDocValues).
>
> An iterator API makes no sense for global ords, which are inherently
> random-access since they are not based on docids.
>
> It seems like we should either:
> 1) create a new LongValues abstract class with essentially the old
> API:  long get(int index)
> 2) create a LongValues interface that can be optionally implemented by
> classes wishing to expose a random access API
>
> -Yonik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>