Yeah. If the intent is to use global ordinals, the fastest way is to handle the single segment case with ordinalMap null check. If its null, dont map the ordinal. Hotspot seems to handle this way best at least, from my experiments. On Aug 22, 2014 10:23 PM, "Joel Bernstein" <[email protected]> wrote:
> Ok, so I'm going to need to account for this, which currently I'm not. > > The test passes most of the time though. Is there randomness built in that > also changes the number of index segments? > > Joel Bernstein > Search Engineer at Heliosearch > > > On Fri, Aug 22, 2014 at 10:13 PM, Robert Muir <[email protected]> wrote: > >> Like the rest of multi apis, if there is only one segment it returns that >> segment itself. >> On Aug 22, 2014 10:11 PM, "Joel Bernstein" <[email protected]> wrote: >> >>> >>> I'm running into test failures when using MultiSortedDocValues. What >>> seems to be happening is that a random docValues codec is chosen for the >>> test which leads to exceptions that look like this: >>> >>> Throwable #1: java.lang.ClassCastException: >>> org.apache.lucene.codecs.lucene410.Lucene410DocValuesProducer$6 cannot be >>> cast to org.apache.lucene.index.MultiDocValues$MultiSortedDocValues >>> >>> Is there a way that I can ensure that MultiSortedDocValues are used >>> during the test? >>> >>> >>> >
