congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DocValues.emptyNumeric
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: neo4j/neo4j

@Override
public NumericDocValues getNormValues( String field )
{
  return DocValues.emptyNumeric();
}
origin: org.apache.lucene/lucene-core

/**
 * Returns NumericDocValues for the field, or {@link #emptyNumeric()} if it has none.
 * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader.
 * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues.
 * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#NUMERIC}.
 * @throws IOException if an I/O error occurs.
 */
public static NumericDocValues getNumeric(LeafReader reader, String field) throws IOException {
 NumericDocValues dv = reader.getNumericDocValues(field);
 if (dv == null) {
  checkField(reader, field, DocValuesType.NUMERIC);
  return emptyNumeric();
 } else {
  return dv;
 }
}

origin: org.apache.lucene/lucene-core

if (entry.docsWithFieldOffset == -2) {
 return DocValues.emptyNumeric();
} else if (entry.docsWithFieldOffset == -1) {
origin: org.apache.lucene/lucene-core

private NumericDocValues getNumeric(NumericEntry entry) throws IOException {
 if (entry.docsWithFieldOffset == -2) {
  return DocValues.emptyNumeric();
 } else if (entry.docsWithFieldOffset == -1) {
origin: org.elasticsearch/elasticsearch

return FieldData.replaceMissing(DocValues.emptyNumeric(), missingValue);
origin: org.elasticsearch/elasticsearch

DocValuesType type = getDocValuesType(reader, field);
if (type == null || type == DocValuesType.NONE) {
  values = DocValues.emptyNumeric();
  return ;
origin: harbby/presto-connectors

@Override
public NumericDocValues getNorms(FieldInfo field) throws IOException {
 return DocValues.emptyNumeric();
}

origin: harbby/presto-connectors

@Override
public synchronized NumericDocValues getNorms(FieldInfo field) throws IOException {
 if (UndeadNormsProducer.isUndead(field)) {
  // Bring undead norms back to life; this is set in Lucene46FieldInfosFormat, to emulate pre-5.0 undead norms
  return DocValues.emptyNumeric();
 }
 NumericDocValues instance = instances.get(field.name);
 if (instance == null) {
  instance = loadNorms(field);
  if (!merging) {
   instances.put(field.name, instance);
   activeCount.incrementAndGet();
  }
 }
 return instance;
}

origin: harbby/presto-connectors

/**
 * An empty SortedNumericDocValues which returns zero values for every document 
 */
public static final SortedNumericDocValues emptySortedNumeric(int maxDoc) {
 return singleton(emptyNumeric(), new Bits.MatchNoBits(maxDoc));
}
origin: harbby/presto-connectors

@Override
public NumericDocValues getNorms(FieldInfo field) throws IOException {
 if (UndeadNormsProducer.isUndead(field)) {
  // Bring undead norms back to life; this is set in Lucene40FieldInfosFormat, to emulate pre-5.0 undead norms
  return DocValues.emptyNumeric();
 }
 return impl.getNumeric(field);
}

origin: org.infinispan/infinispan-embedded-query

/**
 * An empty SortedNumericDocValues which returns zero values for every document 
 */
public static final SortedNumericDocValues emptySortedNumeric(int maxDoc) {
 return singleton(emptyNumeric(), new Bits.MatchNoBits(maxDoc));
}
origin: harbby/presto-connectors

@Override
public NumericDocValues getNorms(FieldInfo field) throws IOException {
 if (UndeadNormsProducer.isUndead(field)) {
  // Bring undead norms back to life; this is set in Lucene42FieldInfosFormat, to emulate pre-5.0 undead norms
  return DocValues.emptyNumeric();
 }
 return impl.getNumeric(field);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/**
 * Returns NumericDocValues for the field, or {@link #emptyNumeric()} if it has none.
 * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader.
 * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues.
 * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#NUMERIC}.
 * @throws IOException if an I/O error occurs.
 */
public static NumericDocValues getNumeric(LeafReader reader, String field) throws IOException {
 NumericDocValues dv = reader.getNumericDocValues(field);
 if (dv == null) {
  checkField(reader, field, DocValuesType.NUMERIC);
  return emptyNumeric();
 } else {
  return dv;
 }
}

origin: org.infinispan/infinispan-embedded-query

/**
 * Returns NumericDocValues for the field, or {@link #emptyNumeric()} if it has none. 
 * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader.
 * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues.
 * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#NUMERIC}.
 * @throws IOException if an I/O error occurs.
 */
public static NumericDocValues getNumeric(LeafReader reader, String field) throws IOException {
 NumericDocValues dv = reader.getNumericDocValues(field);
 if (dv == null) {
  checkField(reader, field, DocValuesType.NUMERIC);
  return emptyNumeric();
 } else {
  return dv;
 }
}

origin: harbby/presto-connectors

/**
 * Returns NumericDocValues for the field, or {@link #emptyNumeric()} if it has none. 
 * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader.
 * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues.
 * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#NUMERIC}.
 * @throws IOException if an I/O error occurs.
 */
public static NumericDocValues getNumeric(LeafReader reader, String field) throws IOException {
 NumericDocValues dv = reader.getNumericDocValues(field);
 if (dv == null) {
  checkField(reader, field, DocValuesType.NUMERIC);
  return emptyNumeric();
 } else {
  return dv;
 }
}

origin: org.infinispan/infinispan-embedded-query

@Override
public NumericDocValues getNumerics(LeafReader reader, String field, Parser parser, boolean setDocsWithField) throws IOException {
 if (parser == null) {
  throw new NullPointerException();
 }
 final NumericDocValues valuesIn = reader.getNumericDocValues(field);
 if (valuesIn != null) {
  // Not cached here by FieldCacheImpl (cached instead
  // per-thread by SegmentReader):
  return valuesIn;
 } else {
  final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
  if (info == null) {
   return DocValues.emptyNumeric();
  } else if (info.getDocValuesType() != DocValuesType.NONE) {
   throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType());
  } else if (info.getIndexOptions() == IndexOptions.NONE) {
   return DocValues.emptyNumeric();
  }
  return (NumericDocValues) caches.get(Long.TYPE).get(reader, new CacheKey(field, parser), setDocsWithField);
 }
}
origin: harbby/presto-connectors

@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
 SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
 final BlockJoinSelector.Type type = order
   ? BlockJoinSelector.Type.MAX
   : BlockJoinSelector.Type.MIN;
 final BitSet parents = parentFilter.getBitSet(context);
 final BitSet children = childFilter.getBitSet(context);
 if (children == null) {
  return DocValues.emptyNumeric();
 }
 return BlockJoinSelector.wrap(sortedNumeric, type, parents, children);
}
@Override
origin: harbby/presto-connectors

@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
 SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
 final BlockJoinSelector.Type type = order
   ? BlockJoinSelector.Type.MAX
   : BlockJoinSelector.Type.MIN;
 final BitSet parents = parentFilter.getBitSet(context);
 final BitSet children = childFilter.getBitSet(context);
 if (children == null) {
  return DocValues.emptyNumeric();
 }
 return BlockJoinSelector.wrap(sortedNumeric, type, parents, children);
}
@Override
origin: harbby/presto-connectors

@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
 SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
 final BlockJoinSelector.Type type = order
   ? BlockJoinSelector.Type.MAX
   : BlockJoinSelector.Type.MIN;
 final BitSet parents = parentFilter.getBitSet(context);
 final BitSet children = childFilter.getBitSet(context);
 if (children == null) {
  return DocValues.emptyNumeric();
 }
 final NumericDocValues view = BlockJoinSelector.wrap(sortedNumeric, type, parents, children);
 // undo the numericutils sortability
 return new NumericDocValues() {
  @Override
  public long get(int docID) {
   return NumericUtils.sortableDoubleBits(view.get(docID));
  }
 };
}
@Override
origin: harbby/presto-connectors

 @Override
 protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
  SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
  final BlockJoinSelector.Type type = order
    ? BlockJoinSelector.Type.MAX
    : BlockJoinSelector.Type.MIN;
  final BitSet parents = parentFilter.getBitSet(context);
  final BitSet children = childFilter.getBitSet(context);
  if (children == null) {
   return DocValues.emptyNumeric();
  }
  final NumericDocValues view = BlockJoinSelector.wrap(sortedNumeric, type, parents, children);
  // undo the numericutils sortability
  return new NumericDocValues() {
   @Override
   public long get(int docID) {
    return NumericUtils.sortableFloatBits((int) view.get(docID));
   }
  };
 }
};
org.apache.lucene.indexDocValuesemptyNumeric

Javadoc

An empty NumericDocValues which returns zero for every document

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
  • emptySortedNumeric
    An empty SortedNumericDocValues which returns zero values for every document
  • getSorted
    Returns SortedDocValues for the field, or #emptySorted if it has none.
  • isCacheable
    Returns true if the specified docvalues fields have not been updated
  • getSorted,
  • isCacheable,
  • checkField,
  • docsWithValue,
  • getDocsWithField,
  • unwrapSingletonBits,
  • emptyLegacySorted

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ImageIO (javax.imageio)
  • Top 12 Jupyter Notebook extensions
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