Class DenseVectorFieldMapper.DenseVectorFieldType

java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.SimpleMappedFieldType
org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper.DenseVectorFieldType
Enclosing class:
DenseVectorFieldMapper

public static final class DenseVectorFieldMapper.DenseVectorFieldType extends SimpleMappedFieldType
  • Constructor Details

  • Method Details

    • typeName

      public String typeName()
      Description copied from class: MappedFieldType
      Returns the name of this type, as would be specified in mapping properties
      Specified by:
      typeName in class MappedFieldType
    • valueFetcher

      public ValueFetcher valueFetcher(SearchExecutionContext context, String format)
      Description copied from class: MappedFieldType
      Create a helper class to fetch field values during the FetchFieldsPhase. New field types must implement this method in order to support the search 'fields' option. Except for metadata fields, field types should not throw UnsupportedOperationException since this could cause a search retrieving multiple fields (like "fields": ["*"]) to fail.
      Specified by:
      valueFetcher in class MappedFieldType
    • docValueFormat

      public DocValueFormat docValueFormat(String format, ZoneId timeZone)
      Description copied from class: MappedFieldType
      Pick a DocValueFormat that can be used to display and parse values of fields of this type.
      Overrides:
      docValueFormat in class MappedFieldType
    • isAggregatable

      public boolean isAggregatable()
      Description copied from class: MappedFieldType
      Returns true if the field is aggregatable.
      Overrides:
      isAggregatable in class MappedFieldType
    • fielddataBuilder

      public IndexFieldData.Builder fielddataBuilder(FieldDataContext fieldDataContext)
      Description copied from class: MappedFieldType
      Return a fielddata builder for this field
      Overrides:
      fielddataBuilder in class MappedFieldType
      Parameters:
      fieldDataContext - the context for the fielddata
    • existsQuery

      public org.apache.lucene.search.Query existsQuery(SearchExecutionContext context)
      Overrides:
      existsQuery in class MappedFieldType
    • termQuery

      public org.apache.lucene.search.Query termQuery(Object value, SearchExecutionContext context)
      Description copied from class: MappedFieldType
      Generates a query that will only match documents that contain the given value. The default implementation returns a TermQuery over the value bytes
      Specified by:
      termQuery in class MappedFieldType
    • createKnnQuery

      public org.apache.lucene.search.Query createKnnQuery(byte[] queryVector, int numCands, org.apache.lucene.search.Query filter, Float similarityThreshold, org.apache.lucene.search.join.BitSetProducer parentFilter)
    • createExactKnnQuery

      public org.apache.lucene.search.Query createExactKnnQuery(float[] queryVector)
    • createKnnQuery

      public org.apache.lucene.search.Query createKnnQuery(float[] queryVector, int numCands, org.apache.lucene.search.Query filter, Float similarityThreshold, org.apache.lucene.search.join.BitSetProducer parentFilter)