Class MultiGeoPointValues

java.lang.Object
org.elasticsearch.index.fielddata.MultiGeoPointValues

public abstract class MultiGeoPointValues
extends java.lang.Object
A stateful lightweight per document set of GeoPoint values. To iterate over values in a document use the following pattern:
   GeoPointValues values = ..;
   values.setDocId(docId);
   final int numValues = values.count();
   for (int i = 0; i < numValues; i++) {
       GeoPoint value = values.valueAt(i);
       // process value
   }
 
The set of values associated with a document might contain duplicates and comes in a non-specified order.
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected MultiGeoPointValues()
    Creates a new MultiGeoPointValues instance
  • Method Summary

    Modifier and Type Method Description
    abstract boolean advanceExact​(int doc)
    Advance this instance to the given document id
    abstract int docValueCount()
    Return the number of geo points the current document has.
    abstract GeoPoint nextValue()
    Return the next value associated with the current document.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • advanceExact

      public abstract boolean advanceExact​(int doc) throws java.io.IOException
      Advance this instance to the given document id
      Returns:
      true if there is a value for this document
      Throws:
      java.io.IOException
    • docValueCount

      public abstract int docValueCount()
      Return the number of geo points the current document has.
    • nextValue

      public abstract GeoPoint nextValue() throws java.io.IOException
      Return the next value associated with the current document. This must not be called more than docValueCount() times. Note: the returned GeoPoint might be shared across invocations.
      Returns:
      the next value for the current docID set to advanceExact(int).
      Throws:
      java.io.IOException