Tabnine Logo
DocValues.getDocsWithField
Code IndexAdd Tabnine to your IDE (free)

How to use
getDocsWithField
method
in
org.apache.lucene.index.DocValues

Best Java code snippets using org.apache.lucene.index.DocValues.getDocsWithField (Showing top 20 results out of 315)

origin: org.infinispan/infinispan-embedded-query

 /** Retrieves a {@link Bits} instance representing documents that have a value in this segment. */
 protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException {
  return DocValues.getDocsWithField(context.reader(), field);
 }
}
origin: harbby/presto-connectors

 /** Retrieves a {@link Bits} instance representing documents that have a value in this segment. */
 protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException {
  return DocValues.getDocsWithField(context.reader(), field);
 }
}
origin: org.infinispan/infinispan-embedded-query

/** Retrieves the set of documents that have a value in this segment */
protected Bits getDocsWithField(LeafReaderContext context, String field) throws IOException {
 return DocValues.getDocsWithField(context.reader(), field);
}
origin: harbby/presto-connectors

/** Retrieves the set of documents that have a value in this segment */
protected Bits getDocsWithField(LeafReaderContext context, String field) throws IOException {
 return DocValues.getDocsWithField(context.reader(), field);
}
origin: hibernate/hibernate-search

@Override
public void doSetNextReader(final LeafReaderContext context) throws IOException {
  final LeafReader atomicReader = context.reader();
  docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField );
  docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField );
  latitudeValues = DocValues.getNumeric( atomicReader, latitudeField );
  longitudeValues = DocValues.getNumeric( atomicReader, longitudeField );
}
origin: org.infinispan/infinispan-embedded-query

private void lazyInit() throws IOException {
  if ( docsWithLatitude != null ) {
    return;
  }
  LeafReader atomicReader = context.reader();
  this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, getLatitudeField() );
  this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, getLongitudeField() );
  this.latitudeValues = DocValues.getNumeric( atomicReader, getLatitudeField() );
  this.longitudeValues = DocValues.getNumeric( atomicReader, getLongitudeField() );
}
origin: org.infinispan/infinispan-embedded-query

@Override
public void doSetNextReader(final LeafReaderContext context) throws IOException {
  final LeafReader atomicReader = context.reader();
  docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField );
  docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField );
  latitudeValues = DocValues.getNumeric( atomicReader, latitudeField );
  longitudeValues = DocValues.getNumeric( atomicReader, longitudeField );
}
origin: hibernate/hibernate-search

DistanceLeafCollector(LeafReaderContext context) throws IOException {
  final LeafReader atomicReader = context.reader();
  this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField );
  this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField );
  this.latitudeValues = DocValues.getNumeric( atomicReader, latitudeField );
  this.longitudeValues = DocValues.getNumeric( atomicReader, longitudeField );
  this.docBase = context.docBase;
}
origin: hibernate/hibernate-search

private void lazyInit() throws IOException {
  if ( docsWithLatitude != null ) {
    return;
  }
  LeafReader atomicReader = context.reader();
  this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, getLatitudeField() );
  this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, getLongitudeField() );
  this.latitudeValues = DocValues.getNumeric( atomicReader, getLatitudeField() );
  this.longitudeValues = DocValues.getNumeric( atomicReader, getLongitudeField() );
}
origin: org.infinispan/infinispan-embedded-query

DistanceLeafCollector(LeafReaderContext context) throws IOException {
  final LeafReader atomicReader = context.reader();
  this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField );
  this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField );
  this.latitudeValues = DocValues.getNumeric( atomicReader, latitudeField );
  this.longitudeValues = DocValues.getNumeric( atomicReader, longitudeField );
  this.docBase = context.docBase;
}
origin: harbby/presto-connectors

@Override
public SortedBinaryDocValues getBytesValues() {
  try {
    final BinaryDocValues values = DocValues.getBinary(reader, field);
    final Bits docsWithField = DocValues.getDocsWithField(reader, field);
    return FieldData.singleton(values, docsWithField);
  } catch (IOException e) {
    throw new IllegalStateException("Cannot load doc values", e);
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

@Override
public SortedBinaryDocValues getBytesValues() {
  try {
    final BinaryDocValues values = DocValues.getBinary(reader, field);
    final Bits docsWithField = DocValues.getDocsWithField(reader, field);
    return FieldData.singleton(values, docsWithField);
  } catch (IOException e) {
    throw new IllegalStateException("Cannot load doc values", e);
  }
}
origin: org.infinispan/infinispan-embedded-query

@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
 final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field);
 final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field);
 return new DoubleDocValues(this) {
  @Override
  public double doubleVal(int doc) {
   return Double.longBitsToDouble(arr.get(doc));
  }
  @Override
  public boolean exists(int doc) {
   return arr.get(doc) != 0 || valid.get(doc);
  }
  @Override
  public ValueFiller getValueFiller() {
   return new ValueFiller() {
    private final MutableValueDouble mval = new MutableValueDouble();
    @Override
    public MutableValue getValue() {
     return mval;
    }
    @Override
    public void fillValue(int doc) {
     mval.value = doubleVal(doc);
     mval.exists = mval.value != 0 || valid.get(doc);
    }
   };
  }
 };
}
origin: org.infinispan/infinispan-embedded-query

@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
 final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field);
 final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field);
 return new FloatDocValues(this) {
  @Override
  public float floatVal(int doc) {
   return Float.intBitsToFloat((int)arr.get(doc));
  }
  @Override
  public boolean exists(int doc) {
   return arr.get(doc) != 0 || valid.get(doc);
  }
  @Override
  public ValueFiller getValueFiller() {
   return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();
    @Override
    public MutableValue getValue() {
     return mval;
    }
    @Override
    public void fillValue(int doc) {
     mval.value = floatVal(doc);
     mval.exists = mval.value != 0 || valid.get(doc);
    }
   };
  }
 };
}
origin: harbby/presto-connectors

@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
 final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field);
 final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field);
 return new FloatDocValues(this) {
  @Override
  public float floatVal(int doc) {
   return Float.intBitsToFloat((int)arr.get(doc));
  }
  @Override
  public boolean exists(int doc) {
   return arr.get(doc) != 0 || valid.get(doc);
  }
  @Override
  public ValueFiller getValueFiller() {
   return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();
    @Override
    public MutableValue getValue() {
     return mval;
    }
    @Override
    public void fillValue(int doc) {
     mval.value = floatVal(doc);
     mval.exists = mval.value != 0 || valid.get(doc);
    }
   };
  }
 };
}
origin: harbby/presto-connectors

@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
 final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field);
 final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field);
 return new DoubleDocValues(this) {
  @Override
  public double doubleVal(int doc) {
   return Double.longBitsToDouble(arr.get(doc));
  }
  @Override
  public boolean exists(int doc) {
   return arr.get(doc) != 0 || valid.get(doc);
  }
  @Override
  public ValueFiller getValueFiller() {
   return new ValueFiller() {
    private final MutableValueDouble mval = new MutableValueDouble();
    @Override
    public MutableValue getValue() {
     return mval;
    }
    @Override
    public void fillValue(int doc) {
     mval.value = doubleVal(doc);
     mval.exists = mval.value != 0 || valid.get(doc);
    }
   };
  }
 };
}
origin: org.infinispan/infinispan-embedded-query

@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
 final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field);
 final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field);
origin: harbby/presto-connectors

 @Override
 protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException {
  final Bits docsWithValue = DocValues.getDocsWithField(context.reader(), field);
  final BitSet parents = parentFilter.getBitSet(context);
  final BitSet children = childFilter.getBitSet(context);
  if (children == null) {
   return new Bits.MatchNoBits(context.reader().maxDoc());
  }
  return BlockJoinSelector.wrap(docsWithValue, parents, children);
 }
};
origin: harbby/presto-connectors

 @Override
 protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException {
  final Bits docsWithValue = DocValues.getDocsWithField(context.reader(), field);
  final BitSet parents = parentFilter.getBitSet(context);
  final BitSet children = childFilter.getBitSet(context);
  if (children == null) {
   return new Bits.MatchNoBits(context.reader().maxDoc());
  }
  return BlockJoinSelector.wrap(docsWithValue, parents, children);
 }
};
origin: harbby/presto-connectors

 @Override
 protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException {
  final Bits docsWithValue = DocValues.getDocsWithField(context.reader(), field);
  final BitSet parents = parentFilter.getBitSet(context);
  final BitSet children = childFilter.getBitSet(context);
  if (children == null) {
   return new Bits.MatchNoBits(context.reader().maxDoc());
  }
  return BlockJoinSelector.wrap(docsWithValue, parents, children);
 }
};
org.apache.lucene.indexDocValuesgetDocsWithField

Javadoc

Returns Bits for the field, or Bits matching nothing if it has none.

Popular methods of DocValues

  • emptySortedSet
    An empty SortedDocValues which returns BytesRef#EMPTY_BYTES for every document
  • getSortedNumeric
    Returns SortedNumericDocValues for the field, or #emptySortedNumeric if it has none.
  • unwrapSingleton
    Returns a single-valued view of the SortedSetDocValues, if it was previously wrapped with #singleton
  • emptyBinary
    An empty BinaryDocValues which returns no documents
  • emptySorted
    An empty SortedDocValues which returns BytesRef#EMPTY_BYTES for every document
  • getBinary
    Returns BinaryDocValues for the field, or #emptyBinary if it has none.
  • getNumeric
    Returns NumericDocValues for the field, or #emptyNumeric() if it has none.
  • getSortedSet
    Returns SortedSetDocValues for the field, or #emptySortedSet if it has none.
  • singleton
    Returns a multi-valued view over the provided SortedDocValues
  • emptyNumeric
    An empty NumericDocValues which returns no documents
  • emptySortedNumeric
    An empty SortedNumericDocValues which returns zero values for every document
  • getSorted
    Returns SortedDocValues for the field, or #emptySorted if it has none.
  • emptySortedNumeric,
  • getSorted,
  • isCacheable,
  • checkField,
  • docsWithValue,
  • unwrapSingletonBits,
  • emptyLegacySorted

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFileChooser (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now