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>
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NAME |
| Constructor | Description |
|---|---|
PercolateQueryBuilder(java.lang.String field,
java.lang.String indexedDocumentIndex,
java.lang.String indexedDocumentType,
java.lang.String indexedDocumentId,
java.lang.String indexedDocumentRouting,
java.lang.String indexedDocumentPreference,
java.lang.Long indexedDocumentVersion) |
Creates a percolator query builder instance for percolating a document in a remote index.
|
PercolateQueryBuilder(java.lang.String field,
java.lang.String documentType,
java.lang.String indexedDocumentIndex,
java.lang.String indexedDocumentType,
java.lang.String indexedDocumentId,
java.lang.String indexedDocumentRouting,
java.lang.String indexedDocumentPreference,
java.lang.Long indexedDocumentVersion) |
Deprecated.
|
PercolateQueryBuilder(java.lang.String field,
java.lang.String documentType,
java.util.List<org.elasticsearch.common.bytes.BytesReference> documents,
org.elasticsearch.common.xcontent.XContentType documentXContentType) |
Deprecated.
|
PercolateQueryBuilder(java.lang.String field,
java.lang.String documentType,
org.elasticsearch.common.bytes.BytesReference document) |
Deprecated.
use
PercolateQueryBuilder(String, BytesReference, XContentType) with the document content
type to avoid autodetection. |
PercolateQueryBuilder(java.lang.String field,
java.util.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(java.lang.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.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
doEquals(PercolateQueryBuilder other) |
|
protected int |
doHashCode() |
|
protected org.elasticsearch.index.query.QueryBuilder |
doRewrite(org.elasticsearch.index.query.QueryRewriteContext queryShardContext) |
|
protected org.apache.lucene.search.Query |
doToQuery(org.elasticsearch.index.query.QueryShardContext 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) |
|
static PercolateQueryBuilder |
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) |
|
java.util.List<org.elasticsearch.common.bytes.BytesReference> |
getDocuments() |
|
java.lang.String |
getDocumentType() |
|
java.lang.String |
getField() |
|
java.lang.String |
getWriteableName() |
|
PercolateQueryBuilder |
setName(java.lang.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. |
addValidationError, boost, boost, declareStandardFields, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQuery, toString, toXContent, writeTopublic static final java.lang.String NAME
@Deprecated
public PercolateQueryBuilder(java.lang.String field,
java.lang.String documentType,
org.elasticsearch.common.bytes.BytesReference document)
PercolateQueryBuilder(String, BytesReference, XContentType) with the document content
type to avoid autodetection.public PercolateQueryBuilder(java.lang.String field,
org.elasticsearch.common.bytes.BytesReference document,
org.elasticsearch.common.xcontent.XContentType documentXContentType)
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 percolatepublic PercolateQueryBuilder(java.lang.String field,
java.util.List<org.elasticsearch.common.bytes.BytesReference> documents,
org.elasticsearch.common.xcontent.XContentType documentXContentType)
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@Deprecated
public PercolateQueryBuilder(java.lang.String field,
java.lang.String documentType,
java.util.List<org.elasticsearch.common.bytes.BytesReference> documents,
org.elasticsearch.common.xcontent.XContentType documentXContentType)
public PercolateQueryBuilder(java.lang.String field,
java.lang.String indexedDocumentIndex,
java.lang.String indexedDocumentType,
java.lang.String indexedDocumentId,
java.lang.String indexedDocumentRouting,
java.lang.String indexedDocumentPreference,
java.lang.Long indexedDocumentVersion)
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@Deprecated
public PercolateQueryBuilder(java.lang.String field,
java.lang.String documentType,
java.lang.String indexedDocumentIndex,
java.lang.String indexedDocumentType,
java.lang.String indexedDocumentId,
java.lang.String indexedDocumentRouting,
java.lang.String indexedDocumentPreference,
java.lang.Long indexedDocumentVersion)
public PercolateQueryBuilder setName(java.lang.String name)
_percolator_document_slot response field
when multiple percolate queries have been specified in the main query.protected void doWriteTo(org.elasticsearch.common.io.stream.StreamOutput out)
throws java.io.IOException
doWriteTo in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>java.io.IOExceptionprotected void doXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params)
throws java.io.IOException
doXContent in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>java.io.IOExceptionpublic static PercolateQueryBuilder fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
java.io.IOExceptionprotected boolean doEquals(PercolateQueryBuilder other)
doEquals in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>protected int doHashCode()
doHashCode in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>public java.lang.String getWriteableName()
protected org.elasticsearch.index.query.QueryBuilder doRewrite(org.elasticsearch.index.query.QueryRewriteContext queryShardContext)
doRewrite in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>protected org.apache.lucene.search.Query doToQuery(org.elasticsearch.index.query.QueryShardContext context)
throws java.io.IOException
doToQuery in class org.elasticsearch.index.query.AbstractQueryBuilder<PercolateQueryBuilder>java.io.IOExceptionpublic java.lang.String getField()
public java.lang.String getDocumentType()
public java.util.List<org.elasticsearch.common.bytes.BytesReference> getDocuments()