Examples of fastSet()


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

  public OpenBitSet getRandomSet(int sz, int bitsToSet) {
    OpenBitSet bs = new OpenBitSet(sz);
    if (sz==0) return bs;
    for (int i=0; i<bitsToSet; i++) {
      bs.fastSet(rand.nextInt(sz));
    }
    return bs;
  }

  public DocSet getHashDocSet(OpenBitSet bs) {
View Full Code Here

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

      int num = tdState.tdocs.read(arr, freq);
      if (num==0) break;
      if (upto + num > docs.length) {
        if (obs == null) obs = new OpenBitSet(maxDoc());
        for (int i = 0; i<num; i++) {
          obs.fastSet(arr[i]);
        }
        numBits += num;
      } else {
        System.arraycopy(arr, 0, docs, upto, num);
        upto += num;
View Full Code Here

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

      }
    }

    if (obs != null) {
      for (int i=0; i<upto; i++) {
        obs.fastSet(docs[i]);
      }
      numBits += upto;
      return new BitDocSet(obs, numBits);
    }
View Full Code Here

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

    DocIdSet docSet = lfilter.getDocIdSet(this.reader);
    OpenBitSet obs = new OpenBitSet();
    DocIdSetIterator it = docSet.iterator();
    int doc;
    while((doc = it.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
      obs.fastSet(doc);
    }
    return new BitDocSet(obs);
  }

  /**
 
View Full Code Here

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

  public OpenBitSet getRandomSet(int sz, int bitsToSet) {
    OpenBitSet bs = new OpenBitSet(sz);
    if (sz==0) return bs;
    for (int i=0; i<bitsToSet; i++) {
      bs.fastSet(rand.nextInt(sz));
    }
    return bs;
  }

  public DocSet getHashDocSet(OpenBitSet bs) {
View Full Code Here

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

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

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

                OpenBitSet docIdSet = parentDocs().get(indexReader.getCoreCacheKey());
                if (docIdSet == null) {
                    docIdSet = new OpenBitSet(indexReader.maxDoc());
                    parentDocs.put(indexReader.getCoreCacheKey(), docIdSet);
                }
                docIdSet.fastSet(parentDocId);
                return;
            }
        }
    }
View Full Code Here

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

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

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

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

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

        TermDocs td = reader.termDocs();
        try {
            td.seek(term);
            if (td.next()) {
                result = new OpenBitSet(reader.maxDoc());
                result.fastSet(td.doc());
                while (td.next()) {
                    result.fastSet(td.doc());
                }
            }
        } finally {
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.