Package org.apache.lucene.facet.util

Examples of org.apache.lucene.facet.util.MultiCategoryListIterator


    for (int i = 0; i < iterators.length; i++) {
      CategoryListParams clp = indexingParams.getCategoryListParams(new CategoryPath(dimensions[i]));
      IntDecoder decoder = clp.createEncoder().createMatchingDecoder();
      iterators[i] = new DocValuesCategoryListIterator(clp.field, decoder);
    }
    MultiCategoryListIterator cli = new MultiCategoryListIterator(iterators);
    for (AtomicReaderContext context : indexReader.leaves()) {
      assertTrue("failed to init multi-iterator", cli.setNextReader(context));
      IntsRef ordinals = new IntsRef();
      final int maxDoc = context.reader().maxDoc();
      for (int i = 0; i < maxDoc; i++) {
        cli.getOrdinals(i, ordinals);
        assertTrue("document " + i + " does not have categories", ordinals.length > 0);
        for (int j = 0; j < ordinals.length; j++) {
          CategoryPath cp = taxoReader.getPath(ordinals.ints[j]);
          assertNotNull("ordinal " + ordinals.ints[j] + " not found in taxonomy", cp);
          if (cp.length == 2) {
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.util.MultiCategoryListIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.