Writeable
, ToXContent
, ToXContentObject
public static final class MoreLikeThisQueryBuilder.Item extends java.lang.Object implements ToXContentObject, Writeable
MoreLikeThisQueryBuilder
.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static MoreLikeThisQueryBuilder.Item[] |
EMPTY_ARRAY |
EMPTY_PARAMS
Constructor | 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 | 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() |
|
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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
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
Writeable
public 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 static MoreLikeThisQueryBuilder.Item parse(XContentParser parser, MoreLikeThisQueryBuilder.Item item) throws java.io.IOException
java.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object