Class PercolateQueryBuilder

java.lang.Object
org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
org.elasticsearch.percolator.PercolateQueryBuilder
All Implemented Interfaces:
org.elasticsearch.common.io.stream.NamedWriteable, org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, org.elasticsearch.index.query.QueryBuilder, org.elasticsearch.index.query.Rewriteable<org.elasticsearch.index.query.QueryBuilder>

public class PercolateQueryBuilder extends org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    org.elasticsearch.common.io.stream.Writeable.Reader<V extends Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
     

    Fields inherited from class org.elasticsearch.index.query.AbstractQueryBuilder

    boost, BOOST_FIELD, DEFAULT_BOOST, queryName

    Fields inherited from interface org.elasticsearch.index.query.Rewriteable

    MAX_REWRITE_ROUNDS

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    PercolateQueryBuilder​(String field, String indexedDocumentIndex, String indexedDocumentType, String indexedDocumentId, String indexedDocumentRouting, String indexedDocumentPreference, Long indexedDocumentVersion)
    Creates a percolator query builder instance for percolating a document in a remote index.
     
    PercolateQueryBuilder​(String field, String documentType, String indexedDocumentIndex, String indexedDocumentType, String indexedDocumentId, String indexedDocumentRouting, String indexedDocumentPreference, Long indexedDocumentVersion)
    Deprecated.
    protected
    PercolateQueryBuilder​(String field, String documentType, Supplier<org.elasticsearch.common.bytes.BytesReference> documentSupplier)
     
     
    PercolateQueryBuilder​(String field, String documentType, List<org.elasticsearch.common.bytes.BytesReference> documents, org.elasticsearch.common.xcontent.XContentType documentXContentType)
    Deprecated.
     
    PercolateQueryBuilder​(String field, String documentType, org.elasticsearch.common.bytes.BytesReference document)
    Deprecated.
    use PercolateQueryBuilder(String, BytesReference, XContentType) with the document content type to avoid autodetection.
     
    PercolateQueryBuilder​(String field, List<org.elasticsearch.common.bytes.BytesReference> documents, org.elasticsearch.common.xcontent.XContentType documentXContentType)
    Creates a percolator query builder instance for percolating a provided document.
     
    PercolateQueryBuilder​(String field, org.elasticsearch.common.bytes.BytesReference document, org.elasticsearch.common.xcontent.XContentType documentXContentType)
    Creates a percolator query builder instance for percolating a provided document.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    protected int
     
    protected org.elasticsearch.index.query.QueryBuilder
    doRewrite​(org.elasticsearch.index.query.QueryRewriteContext queryRewriteContext)
     
    protected org.apache.lucene.search.Query
    doToQuery​(org.elasticsearch.index.query.SearchExecutionContext context)
     
    protected void
    doWriteTo​(org.elasticsearch.common.io.stream.StreamOutput out)
     
    protected void
    doXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
    fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
     
    List<org.elasticsearch.common.bytes.BytesReference>
     
     
     
     
     
    setName​(String name)
    Sets the name used for identification purposes in _percolator_document_slot response field when multiple percolate queries have been specified in the main query.

    Methods inherited from class org.elasticsearch.index.query.AbstractQueryBuilder

    addValidationError, boost, boost, checkNegativeBoost, declareStandardFields, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toQuery, toString, toXContent, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Field Details

  • Constructor Details

    • PercolateQueryBuilder

      @Deprecated public PercolateQueryBuilder(String field, String documentType, org.elasticsearch.common.bytes.BytesReference document)
      Deprecated.
      use PercolateQueryBuilder(String, BytesReference, XContentType) with the document content type to avoid autodetection.
    • PercolateQueryBuilder

      public PercolateQueryBuilder(String field, org.elasticsearch.common.bytes.BytesReference document, org.elasticsearch.common.xcontent.XContentType documentXContentType)
      Creates a percolator query builder instance for percolating a provided document.
      Parameters:
      field - The field that contains the percolator query
      document - The binary blob containing document to percolate
      documentXContentType - The content type of the binary blob containing the document to percolate
    • PercolateQueryBuilder

      public PercolateQueryBuilder(String field, List<org.elasticsearch.common.bytes.BytesReference> documents, org.elasticsearch.common.xcontent.XContentType documentXContentType)
      Creates a percolator query builder instance for percolating a provided document.
      Parameters:
      field - The field that contains the percolator query
      documents - The binary blob containing document to percolate
      documentXContentType - The content type of the binary blob containing the document to percolate
    • PercolateQueryBuilder

      @Deprecated public PercolateQueryBuilder(String field, String documentType, List<org.elasticsearch.common.bytes.BytesReference> documents, org.elasticsearch.common.xcontent.XContentType documentXContentType)
      Deprecated.
    • PercolateQueryBuilder

      protected PercolateQueryBuilder(String field, String documentType, Supplier<org.elasticsearch.common.bytes.BytesReference> documentSupplier)
    • PercolateQueryBuilder

      public PercolateQueryBuilder(String field, String indexedDocumentIndex, String indexedDocumentType, String indexedDocumentId, String indexedDocumentRouting, String indexedDocumentPreference, Long indexedDocumentVersion)
      Creates a percolator query builder instance for percolating a document in a remote index.
      Parameters:
      field - The field that contains the percolator query
      indexedDocumentIndex - The index containing the document to percolate
      indexedDocumentType - The type containing the document to percolate
      indexedDocumentId - The id of the document to percolate
      indexedDocumentRouting - The routing value for the document to percolate
      indexedDocumentPreference - The preference to use when fetching the document to percolate
      indexedDocumentVersion - The expected version of the document to percolate
    • PercolateQueryBuilder

      @Deprecated public PercolateQueryBuilder(String field, String documentType, String indexedDocumentIndex, String indexedDocumentType, String indexedDocumentId, String indexedDocumentRouting, String indexedDocumentPreference, Long indexedDocumentVersion)
      Deprecated.
  • Method Details

    • setName

      public PercolateQueryBuilder setName(String name)
      Sets the name used for identification purposes in _percolator_document_slot response field when multiple percolate queries have been specified in the main query.
    • doWriteTo

      protected void doWriteTo(org.elasticsearch.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      doWriteTo in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
      Throws:
      IOException
    • doXContent

      protected void doXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      doXContent in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
      Throws:
      IOException
    • fromXContent

      public static PercolateQueryBuilder fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • doEquals

      protected boolean doEquals(PercolateQueryBuilder other)
      Specified by:
      doEquals in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
    • doHashCode

      protected int doHashCode()
      Specified by:
      doHashCode in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
    • getWriteableName

      public String getWriteableName()
    • doRewrite

      protected org.elasticsearch.index.query.QueryBuilder doRewrite(org.elasticsearch.index.query.QueryRewriteContext queryRewriteContext)
      Overrides:
      doRewrite in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
    • doToQuery

      protected org.apache.lucene.search.Query doToQuery(org.elasticsearch.index.query.SearchExecutionContext context) throws IOException
      Specified by:
      doToQuery in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
      Throws:
      IOException
    • getField

      public String getField()
    • getDocumentType

      public String getDocumentType()
    • getDocuments

      public List<org.elasticsearch.common.bytes.BytesReference> getDocuments()
    • getQueryName

      public String getQueryName()