public static final class MoreLikeThisQueryBuilder.Item extends java.lang.Object implements ToXContent, Writeable
MoreLikeThisQueryBuilder.| Modifier and Type | Class and Description |
|---|---|
static interface |
MoreLikeThisQueryBuilder.Item.Field |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field and Description |
|---|---|
static MoreLikeThisQueryBuilder.Item[] |
EMPTY_ARRAY |
EMPTY_PARAMS| Constructor and Description |
|---|
Item() |
Item(java.lang.String index,
java.lang.String type,
java.lang.String id)
Constructor for a given item / document request
|
Item(java.lang.String index,
java.lang.String type,
XContentBuilder doc)
Constructor for an artificial document request, that is not present in the index.
|
| Modifier and Type | Method and Description |
|---|---|
BytesReference |
doc() |
boolean |
equals(java.lang.Object o) |
java.lang.String[] |
fields() |
MoreLikeThisQueryBuilder.Item |
fields(java.lang.String... fields) |
int |
hashCode() |
java.lang.String |
id() |
java.lang.String |
index() |
MoreLikeThisQueryBuilder.Item |
index(java.lang.String index) |
static MoreLikeThisQueryBuilder.Item |
parse(XContentParser parser,
MoreLikeThisQueryBuilder.Item item)
Parses and returns the given item.
|
java.util.Map<java.lang.String,java.lang.String> |
perFieldAnalyzer() |
MoreLikeThisQueryBuilder.Item |
perFieldAnalyzer(java.util.Map<java.lang.String,java.lang.String> perFieldAnalyzer)
Sets the analyzer(s) to use at any given field.
|
java.lang.String |
routing() |
MoreLikeThisQueryBuilder.Item |
routing(java.lang.String routing) |
java.lang.String |
toString() |
TermVectorsRequest |
toTermVectorsRequest()
Convert this to a
TermVectorsRequest for fetching the terms of the document. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
type() |
MoreLikeThisQueryBuilder.Item |
type(java.lang.String type) |
long |
version() |
MoreLikeThisQueryBuilder.Item |
version(long version) |
VersionType |
versionType() |
MoreLikeThisQueryBuilder.Item |
versionType(VersionType versionType) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
public static final MoreLikeThisQueryBuilder.Item[] EMPTY_ARRAY
public Item()
public Item(@Nullable java.lang.String index, @Nullable java.lang.String type, java.lang.String id)
index - the index where the document is locatedtype - the type of the documentid - and its idpublic Item(@Nullable java.lang.String index, @Nullable java.lang.String type, XContentBuilder doc)
index - the index to be used for parsing the doctype - the type to be used for parsing the docdoc - the document specificationpublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String index()
public MoreLikeThisQueryBuilder.Item index(java.lang.String index)
public java.lang.String type()
public MoreLikeThisQueryBuilder.Item type(java.lang.String type)
public java.lang.String id()
public BytesReference doc()
public java.lang.String[] fields()
public MoreLikeThisQueryBuilder.Item fields(java.lang.String... fields)
public java.util.Map<java.lang.String,java.lang.String> perFieldAnalyzer()
public MoreLikeThisQueryBuilder.Item perFieldAnalyzer(java.util.Map<java.lang.String,java.lang.String> perFieldAnalyzer)
public java.lang.String routing()
public MoreLikeThisQueryBuilder.Item routing(java.lang.String routing)
public long version()
public MoreLikeThisQueryBuilder.Item version(long version)
public VersionType versionType()
public MoreLikeThisQueryBuilder.Item versionType(VersionType versionType)
public TermVectorsRequest toTermVectorsRequest()
TermVectorsRequest for fetching the terms of the document.public static MoreLikeThisQueryBuilder.Item parse(XContentParser parser, MoreLikeThisQueryBuilder.Item item) throws java.io.IOException
java.io.IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object