Package org.elasticsearch.percolator
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 -
Field Summary
FieldsFields inherited from class org.elasticsearch.index.query.AbstractQueryBuilder
boost, BOOST_FIELD, DEFAULT_BOOST, queryNameFields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionPercolateQueryBuilder(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.protectedPercolateQueryBuilder(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.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 TypeMethodDescriptionprotected booleandoEquals(PercolateQueryBuilder other)protected intprotected org.elasticsearch.index.query.QueryBuilderdoRewrite(org.elasticsearch.index.query.QueryRewriteContext queryRewriteContext)protected org.apache.lucene.search.QuerydoToQuery(org.elasticsearch.index.query.SearchExecutionContext context)protected voiddoWriteTo(org.elasticsearch.common.io.stream.StreamOutput out)protected voiddoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)static PercolateQueryBuilderfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)List<org.elasticsearch.common.bytes.BytesReference>getField()Sets the name used for identification purposes in_percolator_document_slotresponse 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, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
PercolateQueryBuilder
@Deprecated public PercolateQueryBuilder(String field, String documentType, org.elasticsearch.common.bytes.BytesReference document)Deprecated.usePercolateQueryBuilder(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 querydocument- The binary blob containing document to percolatedocumentXContentType- 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 querydocuments- The binary blob containing document to percolatedocumentXContentType- 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
-
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 queryindexedDocumentIndex- The index containing the document to percolateindexedDocumentType- The type containing the document to percolateindexedDocumentId- The id of the document to percolateindexedDocumentRouting- The routing value for the document to percolateindexedDocumentPreference- The preference to use when fetching the document to percolateindexedDocumentVersion- 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
Sets the name used for identification purposes in_percolator_document_slotresponse field when multiple percolate queries have been specified in the main query. -
doWriteTo
- Specified by:
doWriteToin classorg.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:
doXContentin classorg.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>- Throws:
IOException
-
fromXContent
public static PercolateQueryBuilder fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
doEquals
- Specified by:
doEqualsin classorg.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
-
doHashCode
protected int doHashCode()- Specified by:
doHashCodein classorg.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
-
getWriteableName
-
doRewrite
protected org.elasticsearch.index.query.QueryBuilder doRewrite(org.elasticsearch.index.query.QueryRewriteContext queryRewriteContext)- Overrides:
doRewritein classorg.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>
-
doToQuery
protected org.apache.lucene.search.Query doToQuery(org.elasticsearch.index.query.SearchExecutionContext context) throws IOException- Specified by:
doToQueryin classorg.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>- Throws:
IOException
-
getField
-
getDocumentType
-
getDocuments
-
getQueryName
-
PercolateQueryBuilder(String, BytesReference, XContentType)with the document content type to avoid autodetection.