Java Code Examples for org.apache.lucene.util.Bits#MatchAllBits

The following examples show how to use org.apache.lucene.util.Bits#MatchAllBits . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VersionFieldUpgrader.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public Bits getDocsWithField(FieldInfo field) throws IOException {
    if (VersionFieldMapper.NAME.equals(field.name)) {
        return new Bits.MatchAllBits(reader.maxDoc());
    } else {
        return in.getDocsWithField(field);
    }
}
 
Example 2
Source File: AlfrescoCollatableTextFieldType.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public LeafFieldComparator getLeafComparator(LeafReaderContext context) throws IOException
{
    docTerms = DocValues.getBinary(context.reader(), field);
    docsWithField = DocValues.getDocsWithField(context.reader(), field);
    if (docsWithField instanceof Bits.MatchAllBits) {
      docsWithField = null;
    }
    return this;
}
 
Example 3
Source File: AlfrescoCollatableMLTextFieldType.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public LeafFieldComparator getLeafComparator(LeafReaderContext context) throws IOException
{
    docTerms = DocValues.getBinary(context.reader(), field);
    docsWithField = DocValues.getDocsWithField(context.reader(), field);
    if (docsWithField instanceof Bits.MatchAllBits)
    {
        docsWithField = null;
    }
    return this;
}
 
Example 4
Source File: FieldCacheImpl.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
@Override
public long ramBytesUsed() {
  long base = RamUsageEstimator.NUM_BYTES_OBJECT_REF;
  if (bits instanceof Bits.MatchAllBits || bits instanceof Bits.MatchNoBits) {
    return base;
  } else {
    return base + (bits.length() >>> 3);
  }
}
 
Example 5
Source File: FieldUpdatesBuffer.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
BufferedUpdateIterator() {
  this.termValuesIterator = termValues.iterator(termSortState);
  this.lookAheadTermIterator = termSortState != null ? termValues.iterator(termSortState) : null;
  this.byteValuesIterator = isNumeric ? null : byteValues.iterator();
  updatesWithValue = hasValues == null ? new Bits.MatchAllBits(numUpdates) : hasValues;
}