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

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

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

origin: neo4j/neo4j

@Override
public BinaryDocValues getBinaryDocValues( String field )
{
  return DocValues.emptyBinary();
}
origin: org.apache.lucene/lucene-core

/**
 * Returns BinaryDocValues for the field, or {@link #emptyBinary} 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#BINARY}
 *                               or {@link DocValuesType#SORTED}.
 * @throws IOException if an I/O error occurs.
 */
public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException {
 BinaryDocValues dv = reader.getBinaryDocValues(field);
 if (dv == null) {
  dv = reader.getSortedDocValues(field);
  if (dv == null) {
   checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED);
   return emptyBinary();
  }
 }
 return dv;
}

origin: org.apache.lucene/lucene-core

BinaryEntry entry = binaries.get(field.name);
if (entry.docsWithFieldOffset == -2) {
 return DocValues.emptyBinary();
origin: org.elasticsearch/elasticsearch

/**
 * Return a {@link SortedBinaryDocValues} that doesn't contain any value.
 */
public static SortedBinaryDocValues emptySortedBinary() {
  return singleton(DocValues.emptyBinary());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Return a {@link SortedBinaryDocValues} that doesn't contain any value.
 */
public static SortedBinaryDocValues emptySortedBinary() {
  return singleton(DocValues.emptyBinary());
}
origin: apache/servicemix-bundles

/**
 * Return a {@link SortedBinaryDocValues} that doesn't contain any value.
 */
public static SortedBinaryDocValues emptySortedBinary() {
  return singleton(DocValues.emptyBinary());
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Return a {@link SortedBinaryDocValues} that doesn't contain any value.
 */
public static SortedBinaryDocValues emptySortedBinary(int maxDoc) {
  return singleton(DocValues.emptyBinary(), new Bits.MatchNoBits(maxDoc));
}
origin: org.codelibs/elasticsearch-querybuilders

/**
 * Return a {SortedBinaryDocValues} that doesn't contain any value.
 */
public static SortedBinaryDocValues emptySortedBinary(int maxDoc) {
  return singleton(DocValues.emptyBinary(), new Bits.MatchNoBits(maxDoc));
}
origin: harbby/presto-connectors

/**
 * Return a {@link SortedBinaryDocValues} that doesn't contain any value.
 */
public static SortedBinaryDocValues emptySortedBinary(int maxDoc) {
  return singleton(DocValues.emptyBinary(), new Bits.MatchNoBits(maxDoc));
}
origin: org.infinispan/infinispan-embedded-query

@Override
public OrdinalsSegmentReader getReader(LeafReaderContext context) throws IOException {
 BinaryDocValues values0 = context.reader().getBinaryDocValues(field);
 if (values0 == null) {
  values0 = DocValues.emptyBinary();
 }
 final BinaryDocValues values = values0;
 return new OrdinalsSegmentReader() {
  @Override
  public void get(int docID, IntsRef ordinals) throws IOException {
   final BytesRef bytes = values.get(docID);
   decode(bytes, ordinals);
  }
 };
}
origin: org.apache.lucene/lucene-facet

@Override
public OrdinalsSegmentReader getReader(LeafReaderContext context) throws IOException {
 BinaryDocValues values0 = context.reader().getBinaryDocValues(field);
 if (values0 == null) {
  values0 = DocValues.emptyBinary();
 }
 final BinaryDocValues values = values0;
 return new OrdinalsSegmentReader() {
  private int lastDocID;
  
  @Override
  public void get(int docID, IntsRef ordinals) throws IOException {
   if (docID < lastDocID) {
    throw new AssertionError("docs out of order: lastDocID=" + lastDocID + " vs docID=" + docID);
   }
   lastDocID = docID;
   if (docID > values.docID()) {
    values.advance(docID);
   }
   final BytesRef bytes;
   if (values.docID() == docID) {
    bytes = values.binaryValue();
   } else {
    bytes = new BytesRef(BytesRef.EMPTY_BYTES);
   }
   decode(bytes, ordinals);
  }
 };
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/**
 * Returns BinaryDocValues for the field, or {@link #emptyBinary} 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#BINARY}
 *                               or {@link DocValuesType#SORTED}.
 * @throws IOException if an I/O error occurs.
 */
public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException {
 BinaryDocValues dv = reader.getBinaryDocValues(field);
 if (dv == null) {
  dv = reader.getSortedDocValues(field);
  if (dv == null) {
   checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED);
   return emptyBinary();
  }
 }
 return dv;
}

origin: org.infinispan/infinispan-embedded-query

/**
 * Returns BinaryDocValues for the field, or {@link #emptyBinary} 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#BINARY}
 *                               or {@link DocValuesType#SORTED}.
 * @throws IOException if an I/O error occurs.
 */
public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException {
 BinaryDocValues dv = reader.getBinaryDocValues(field);
 if (dv == null) {
  dv = reader.getSortedDocValues(field);
  if (dv == null) {
   checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED);
   return emptyBinary();
  }
 }
 return dv;
}

origin: harbby/presto-connectors

/**
 * Returns BinaryDocValues for the field, or {@link #emptyBinary} 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#BINARY}
 *                               or {@link DocValuesType#SORTED}.
 * @throws IOException if an I/O error occurs.
 */
public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException {
 BinaryDocValues dv = reader.getBinaryDocValues(field);
 if (dv == null) {
  dv = reader.getSortedDocValues(field);
  if (dv == null) {
   checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED);
   return emptyBinary();
  }
 }
 return dv;
}

origin: org.infinispan/infinispan-embedded-query

public BinaryDocValues getTerms(LeafReader reader, String field, boolean setDocsWithField, float acceptableOverheadRatio) throws IOException {
 BinaryDocValues valuesIn = reader.getBinaryDocValues(field);
 if (valuesIn == null) {
  valuesIn = reader.getSortedDocValues(field);
 }
 if (valuesIn != null) {
  // Not cached here by FieldCacheImpl (cached instead
  // per-thread by SegmentReader):
  return valuesIn;
 }
 final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
 if (info == null) {
  return DocValues.emptyBinary();
 } 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.emptyBinary();
 }
 BinaryDocValuesImpl impl = (BinaryDocValuesImpl) caches.get(BinaryDocValues.class).get(reader, new CacheKey(field, acceptableOverheadRatio), setDocsWithField);
 return impl.iterator();
}
origin: harbby/presto-connectors

public BinaryDocValues getTerms(LeafReader reader, String field, boolean setDocsWithField, float acceptableOverheadRatio) throws IOException {
 BinaryDocValues valuesIn = reader.getBinaryDocValues(field);
 if (valuesIn == null) {
  valuesIn = reader.getSortedDocValues(field);
 }
 if (valuesIn != null) {
  // Not cached here by FieldCacheImpl (cached instead
  // per-thread by SegmentReader):
  return valuesIn;
 }
 final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
 if (info == null) {
  return DocValues.emptyBinary();
 } 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.emptyBinary();
 }
 BinaryDocValuesImpl impl = (BinaryDocValuesImpl) caches.get(BinaryDocValues.class).get(reader, new CacheKey(field, acceptableOverheadRatio), setDocsWithField);
 return impl.iterator();
}
origin: org.infinispan/infinispan-embedded-query

BinaryDocValues v = context.reader().getBinaryDocValues(field);
if (v == null) {
 v = DocValues.emptyBinary();
} else {
 anyReal = true;
origin: harbby/presto-connectors

BinaryDocValues v = context.reader().getBinaryDocValues(field);
if (v == null) {
 v = DocValues.emptyBinary();
} else {
 anyReal = true;
origin: org.infinispan/infinispan-embedded-query

values = DocValues.emptyBinary();
bits = new Bits.MatchNoBits(mergeState.maxDocs[i]);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

BinaryEntry entry = binaries.get(field.name);
if (entry.docsWithFieldOffset == -2) {
 return DocValues.emptyBinary();
org.apache.lucene.indexDocValuesemptyBinary

Javadoc

An empty BinaryDocValues which returns BytesRef#EMPTY_BYTES 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
  • 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.
  • 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)
  • From CI to AI: The AI layer in your organization
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