OpenBitSet.nextSetBit
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.lucene.util.OpenBitSet.nextSetBit(Showing top 14 results out of 315)

  • Common ways to obtain OpenBitSet
private void myMethod () {
OpenBitSet o =
  • IndexReader indexReader;new OpenBitSet(indexReader.maxDoc())
  • new OpenBitSet(long1)
  • Smart code suggestions by Codota
}
origin: Alfresco/community-edition-old

@Override
public boolean next() throws IOException
{
  doc = openBitSet.nextSetBit(doc+1);
  return (doc != -1)  && (doc < (solrIndexReader.getBase()  + solrIndexReader.maxDoc()));
}
origin: com.atlassian.jira/jira-core

private Set<String> getIssueIdsDirectly() throws IOException
{
  final Set<String> issueIds = new TreeSet<String>();
  FieldSelector selector = new FieldSelector()
  {
    @Override
    public FieldSelectorResult accept(final String fieldName)
    {
      return fieldName.equals(DocumentConstants.ISSUE_ID) ? FieldSelectorResult.LOAD_AND_BREAK : FieldSelectorResult.NO_LOAD;
    }
  };
  // Do a virtual trim of the bit set so we don't unnecessarily scan to the end
  docIds.setNumWords(OpenBitSet.bits2words(maxDocId + 1));
  for (int docId = docIds.nextSetBit(minDocId); docId >= 0; docId = docIds.nextSetBit(docId+1))
  {
    Document doc = indexReader.document(docId, selector);
    issueIds.add(doc.get(DocumentConstants.ISSUE_ID));
  }
  return issueIds;
}
origin: senseidb/bobo

 @Override
 public double getFacetSelectivity(BoboSegmentReader reader) {
  FacetDataCache<?> dataCache = facetDataCacheBuilder.build(reader);
  final OpenBitSet openBitSet = getBitSet(dataCache);
  int[] frequencies = dataCache.freqs;
  double selectivity = 0;
  int accumFreq = 0;
  int index = openBitSet.nextSetBit(0);
  while (index >= 0) {
   accumFreq += frequencies[index];
   index = openBitSet.nextSetBit(index + 1);
  }
  int total = reader.maxDoc();
  selectivity = (double) accumFreq / (double) total;
  if (selectivity > 0.999) {
   selectivity = 1.0;
  }
  return selectivity;
 }
}
origin: Alfresco/community-edition-old

private boolean shouldElementBeIgnored(long dbId, SolrIndexSearcher solrIndexSearcher, DocSet skippingDocs) throws IOException
{
  boolean result = false;
  if ((skipDescendantAuxDocsForSpecificTypes && !typesForSkippingDescendantAuxDocs.isEmpty())
      || (skipDescendantAuxDocsForSpecificAspects && !aspectsForSkippingDescendantAuxDocs.isEmpty()))
  {
    BooleanQuery query = new BooleanQuery();
    query.add(new TermQuery(new Term(QueryConstants.FIELD_DBID, NumericEncoder.encode(dbId))), Occur.MUST);
    DocSet docSet = solrIndexSearcher.getDocSet(query);
    int index = -1;
    if (docSet instanceof BitDocSet)
    {
      BitDocSet source = (BitDocSet) docSet;
      OpenBitSet openBitSet = source.getBits();
      index = openBitSet.nextSetBit(index + 1);
    }
    else
    {
      DocIterator it = docSet.iterator();
      if (it.hasNext())
      {
        index = it.nextDoc();
      }
    }
    result = (-1 != index) && skippingDocs.exists(index);
  }
  return result;
}
origin: Alfresco/community-edition-old

public boolean next() throws IOException
{
  position++;
  position = set.nextSetBit(position);
  return (position != -1);
}
origin: Alfresco/community-edition-old

OpenBitSet openBitSet = source.getBits();
int current = -1;
while ((current = openBitSet.nextSetBit(current + 1)) != -1)
origin: Alfresco/community-edition-old

OpenBitSet openBitSet = source.getBits();
int current = -1;
while ((current = openBitSet.nextSetBit(current + 1)) != -1)
origin: Alfresco/community-edition-old

OpenBitSet openBitSet = source.getBits();
int current = -1;
while ((current = openBitSet.nextSetBit(current + 1)) != -1)
origin: Alfresco/community-edition-old

OpenBitSet openBitSet = source.getBits();
int current = -1;
while((current = openBitSet.nextSetBit(current+1)) != -1)
origin: Alfresco/community-edition-old

while( (s = set.nextSetBit(s+1)) != -1)
origin: Alfresco/community-edition-old

OpenBitSet openBitSet = source.getBits();
int current = -1;
while ((current = openBitSet.nextSetBit(current + 1)) != -1)
origin: HPI-Information-Systems/Metanome

/**
 * Returns a list of all set column indices.
 *
 * @return the list of indices with set bits
 */
public List<Integer> getSetBits() {
 List<Integer> setBits = new ArrayList<>(size());
 int setBitIndex = 0;
 while (true) {
  setBitIndex = bitset.nextSetBit(setBitIndex);
  if (setBitIndex == -1) {
   break;
  } else {
   setBits.add(setBitIndex);
  }
  setBitIndex++;
 }
 return setBits;
}
origin: Alfresco/community-edition-old

while (((current = allLeafDocs.nextSetBit(current + 1)) < start + length) && (current >= 0))
origin: Alfresco/community-edition-old

while ((doc = allLeafDocs.nextSetBit(doc + 1)) != -1)
org.apache.lucene.utilOpenBitSetnextSetBit

Popular methods of OpenBitSet

  • <init>
  • set
  • cardinality
  • get
  • fastSet
  • flip
  • and
  • bits2words
  • equals
  • fastGet
  • andNot
  • capacity
  • andNot,
  • capacity,
  • clear,
  • clone,
  • fastClear,
  • fastFlip,
  • getBit,
  • hashCode,
  • length

Popular classes and methods

  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setContentView (Activity)
  • FlowLayout (java.awt)
  • Font (java.awt)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ResultSet (java.sql)
    A table of data representing a database result set, which is usually generated by executing a statem
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TimeZone (java.util)
    TimeZone represents a time zone, primarily used for configuring a Calendar or java.text.SimpleDateF
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)