Package org.apache.lucene.util

Examples of org.apache.lucene.util.OpenBitSet.fastSet()


            td.seek(term);
            if (td.next()) {
                result = new OpenBitSet(reader.maxDoc());
                result.fastSet(td.doc());
                while (td.next()) {
                    result.fastSet(td.doc());
                }
            }
        } finally {
            td.close();
        }
View Full Code Here


        }
        int docFreq = reader.docFreq(primeDocTerm);
        int doc;
        int count = 0;
        while ((doc = termDocsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
          bs.fastSet(doc);
          count++;
        }
        if (count == docFreq) {
          primeDocMap.put(key, bs);
        } else {
View Full Code Here

  */
  public DocSet convertFilter(Filter lfilter) throws IOException {
    BitSet bs = lfilter.bits(this.reader);
    OpenBitSet obs = new OpenBitSet(bs.size());
    for(int i=bs.nextSetBit(0); i>=0; i=bs.nextSetBit(i+1)) {
      obs.fastSet(i);
    }
    return new BitDocSet(obs);
  }

  /**
 
View Full Code Here

            sfc.indexed = ftype == null ? sfc.name : ftype.toInternal(sfc.name);
            sfc.termNum = termNum++;
            counts.put(name, sfc);
          }
          sfc.count += count;
          terms.fastSet(sfc.termNum);
          last = count;
        }
      }

      // the largest possible missing term is 0 if we received less
View Full Code Here

  @Override
  public OpenBitSet getBits() {
    int maxDoc = size() > 0 ? docs[size()-1] : 0;
    OpenBitSet bs = new OpenBitSet(maxDoc+1);
    for (int doc : docs) {
      bs.fastSet(doc);
    }
    return bs;
  }

View Full Code Here

        do {
          Term term = termEnum.term();
          if (term==null || term.field() != field) break;
          termDocs.seek (termEnum);
          while (termDocs.next()) {
            res.fastSet(termDocs.doc());
          }
        } while (termEnum.next());
      } finally {
        termDocs.close();
        termEnum.close();
View Full Code Here

              if(!loader.add(docid, valId)) logOverflow(fieldName);
              else weightLoader.add(docid, weight);

              if (docid < minID) minID = docid;
              bitset.fastSet(docid);
              while(tdoc.next())
              {
                df++;
                docid = tdoc.doc();
               
View Full Code Here

                docid = tdoc.doc();
               
                if(!loader.add(docid, valId)) logOverflow(fieldName);
                else weightLoader.add(docid, weight);

                bitset.fastSet(docid);
              }
              if (docid > maxID) maxID = docid;
            }
            pre = val;
          }
View Full Code Here

  public OpenBitSet bitSet(FacetDataCache dataCache) {
    int[] index = facetValueConverter.convert(dataCache, vals);
   
    OpenBitSet bitset = new OpenBitSet(dataCache.valArray.size());
    for (int i : index) {
      bitset.fastSet(i);
    }
    if (takeCompliment)
    {
      // flip the bits
      for (int i=0; i < index.length; ++i){
View Full Code Here

            {
              df++;
              int docid = tdoc.doc();
              if(!loader.add(docid, valId)) logOverflow(fieldName);
              minID = docid;
              bitset.fastSet(docid);
              while(tdoc.next())
              {
                df++;
                docid = tdoc.doc();
              
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.