Examples of AndDocIdSet


Examples of com.kamikaze.docidset.impl.AndDocIdSet

      if (negativeSet==null){
        return positiveSet;
      }
      else {
        DocIdSet[] sets = new DocIdSet[]{positiveSet,new NotDocIdSet(negativeSet, reader.maxDoc())};
        return new AndDocIdSet(Arrays.asList(sets));
      }
    }
    else{
      if (negativeSet==null){
        return EmptyFilter.getInstance().getRandomAccessDocIdSet(reader);
View Full Code Here

Examples of org.elasticsearch.common.lucene.docset.AndDocIdSet

            sets.add(set);
        }
        if (allAreDocSet) {
            return new AndDocSet(sets);
        }
        return new AndDocIdSet(sets);
    }
View Full Code Here

Examples of org.elasticsearch.common.lucene.docset.AndDocIdSet

        MultiGeoPointValues values = indexFieldData.load(context).getGeoPointValues();
        GeoDistanceRangeDocSet distDocSet = new GeoDistanceRangeDocSet(context.reader().maxDoc(), acceptedDocs, values, fixedSourceDistance, distanceBoundingCheck, inclusiveLowerPoint, inclusiveUpperPoint);
        if (boundingBoxDocSet == null) {
            return distDocSet;
        } else {
            return new AndDocIdSet(new DocIdSet[]{boundingBoxDocSet, distDocSet});
        }
    }
View Full Code Here

Examples of org.elasticsearch.common.lucene.docset.AndDocIdSet

        final MultiGeoPointValues values = indexFieldData.load(context).getGeoPointValues();
        GeoDistanceDocSet distDocSet = new GeoDistanceDocSet(context.reader().maxDoc(), acceptedDocs, values, fixedSourceDistance, distanceBoundingCheck, distance);
        if (boundingBoxDocSet == null) {
            return distDocSet;
        } else {
            return new AndDocIdSet(new DocIdSet[]{boundingBoxDocSet, distDocSet});
        }
    }
View Full Code Here

Examples of org.elasticsearch.common.lucene.docset.AndDocIdSet

                            return randomSet.get(doc);
                        }
                    };
                }
            }
            AndDocIdSet andSet = new AndDocIdSet(sets);
            Bits andBits = andSet.bits();
            if (andBits != null) {
                for (int i = 0; i < numDocs; ++i) {
                    assertEquals(anded.get(i), andBits.get(i));
                }
            }
            DocIdSetIterator andIt = andSet.iterator();
            if (andIt == null) {
                assertEquals(0, anded.cardinality());
            } else {
                int previous = -1;
                for (int doc = andIt.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = andIt.nextDoc()) {
View Full Code Here

Examples of org.elasticsearch.common.lucene.docset.AndDocIdSet

            if (DocIdSets.isEmpty(set)) { // none matching for this filter, we AND, so return EMPTY
                return null;
            }
            sets[i] = set;
        }
        return BitsFilteredDocIdSet.wrap(new AndDocIdSet(sets), acceptDocs);
    }
View Full Code Here

Examples of org.hibernate.search.filter.AndDocIdSet

  public void testAndDocIdSets() {
    List<DocIdSet> filters = new ArrayList<DocIdSet>( 2 );
    filters.add( arrayToDocIdSet( testDataFrom0to9 ) );
    filters.add( arrayToDocIdSet( testDataFrom1to10 ) );
    DocIdSet expected = arrayToDocIdSet( testDataFrom1to9 );
    DocIdSet testedSet = new AndDocIdSet( filters, 10 );
    assertTrue( docIdSetsEqual( expected, testedSet ) );
  }
View Full Code Here

Examples of org.hibernate.search.filter.AndDocIdSet

  public void onRandomBigArraysTest(long randomSeed) {
    List<BitSet> filtersData = makeRandomBitSetList( randomSeed, 4, 1000000, 1500000 );
    BitSet expectedBitset = applyANDOnBitSets( filtersData );
    List<DocIdSet> filters = toDocIdSetList( filtersData );
    DocIdBitSet expectedDocIdSet = new DocIdBitSet( expectedBitset );
    DocIdSet testedSet = new AndDocIdSet( filters, 1500000 );
    assertTrue( docIdSetsEqual(expectedDocIdSet, testedSet) );
  }
View Full Code Here

Examples of org.hibernate.search.filter.AndDocIdSet

    }
    List<DocIdSet> docIdSetList = toDocIdSetList( filtersData );
    {
      long startTime = System.currentTimeMillis();
      for ( int i=0; i<1000; i++ ) {
        andedByIterationResult = new AndDocIdSet( docIdSetList, maxBitsSize );
        // iteration is needed because the AND is been done lazily on iterator access:
        iterateOnResults( andedByIterationResult );
      }
      long totalTimeMs = System.currentTimeMillis() - startTime;
      System.out.println( "Time to \"use AndDocIdSet iterator on " + listSize +
View Full Code Here

Examples of org.hibernate.search.filter.AndDocIdSet

  public void onRandomBigArraysTest(long randomSeed) {
    List<BitSet> filtersData = makeRandomBitSetList( randomSeed, 4, 1000000, 1500000 );
    BitSet expectedBitset = applyANDOnBitSets( filtersData );
    List<DocIdSet> filters = toDocIdSetList( filtersData );
    DocIdBitSet expectedDocIdSet = new DocIdBitSet( expectedBitset );
    DocIdSet testedSet = new AndDocIdSet( filters, 1500000 );
    assertTrue( docIdSetsEqual(expectedDocIdSet, testedSet) );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.