Package org.elasticsearch.index.query
Class MoreLikeThisQueryBuilder.Item
java.lang.Object
org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item
- All Implemented Interfaces:
Writeable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
- Enclosing class:
- MoreLikeThisQueryBuilder
public static final class MoreLikeThisQueryBuilder.Item
extends Object
implements org.elasticsearch.xcontent.ToXContentObject, Writeable
A single item to be used for a
MoreLikeThisQueryBuilder
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondoc()
boolean
String[]
fields()
int
hashCode()
id()
index()
parse
(org.elasticsearch.xcontent.XContentParser parser, MoreLikeThisQueryBuilder.Item item) Parses and returns the given item.perFieldAnalyzer
(Map<String, String> perFieldAnalyzer) Sets the analyzer(s) to use at any given field.routing()
toString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) long
version()
version
(long version) versionType
(VersionType versionType) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
Item
public Item() -
Item
Constructor for a given item / document request- Parameters:
index
- the index where the document is locatedid
- and its id
-
Item
Constructor for an artificial document request, that is not present in the index.- Parameters:
index
- the index to be used for parsing the docdoc
- the document specification
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
index
-
index
-
id
-
doc
-
fields
-
fields
-
perFieldAnalyzer
-
perFieldAnalyzer
Sets the analyzer(s) to use at any given field. -
routing
-
routing
-
version
public long version() -
version
-
versionType
-
versionType
-
parse
public static MoreLikeThisQueryBuilder.Item parse(org.elasticsearch.xcontent.XContentParser parser, MoreLikeThisQueryBuilder.Item item) throws IOException Parses and returns the given item.- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
toString
-
hashCode
public int hashCode() -
equals
-