Class MoreLikeThisQueryBuilder.Item

org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject
Enclosing class:
MoreLikeThisQueryBuilder

public static final class MoreLikeThisQueryBuilder.Item extends implements org.elasticsearch.common.xcontent.ToXContentObject, Writeable
A single item to be used for a MoreLikeThisQueryBuilder.
  • Field Details

  • Constructor Details

    • Item

      public Item()
    • Item

      public Item(@Nullable  index,  id)
      Constructor for a given item / document request
      Parameters:
      index - the index where the document is located
      id - and its id
    • Item

      public Item(@Nullable  index, org.elasticsearch.common.xcontent.XContentBuilder doc)
      Constructor for an artificial document request, that is not present in the index.
      Parameters:
      index - the index to be used for parsing the doc
      doc - the document specification
    • Item

      public Item(@Nullable  index, @Nullable  type,  id)
      Deprecated.
      Types are in the process of being removed, use Item(java.lang.String,java.lang.String) instead.
      Constructor for a given item / document request
      Parameters:
      index - the index where the document is located
      type - the type of the document
      id - and its id
    • Item

      public Item(@Nullable  index, @Nullable  type, org.elasticsearch.common.xcontent.XContentBuilder doc)
      Deprecated.
      Types are in the process of being removed, use Item(java.lang.String,org.elasticsearch.common.xcontent.XContentBuilder) instead.
      Constructor for an artificial document request, that is not present in the index.
      Parameters:
      index - the index to be used for parsing the doc
      type - the type to be used for parsing the doc
      doc - the document specification
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
    • index

      public  index()
    • index

      public  index)
    • type

      public  type()
      Deprecated.
      Types are in the process of being removed.
    • type

      public  type)
      Deprecated.
      Types are in the process of being removed.
    • id

      public  id()
    • doc

      public BytesReference doc()
    • fields

      public [] fields()
    • fields

      public ... fields)
    • perFieldAnalyzer

      public <,​> perFieldAnalyzer()
    • perFieldAnalyzer

      public <,​> perFieldAnalyzer)
      Sets the analyzer(s) to use at any given field.
    • routing

      public  routing()
    • routing

      public  routing)
    • version

      public long version()
    • version

      public MoreLikeThisQueryBuilder.Item version(long version)
    • versionType

      public VersionType versionType()
    • versionType

      public MoreLikeThisQueryBuilder.Item versionType(VersionType versionType)
    • parse

      public static MoreLikeThisQueryBuilder.Item parse(org.elasticsearch.common.xcontent.XContentParser parser, MoreLikeThisQueryBuilder.Item item) throws
      Parses and returns the given item.
      Throws:
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • toString

      public  toString()
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class 
    • equals

      public boolean equals( o)
      Overrides:
       in class