Package org.elasticsearch.index.query
Class MoreLikeThisQueryBuilder.Item
org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
- Enclosing class:
- MoreLikeThisQueryBuilder
public static final class MoreLikeThisQueryBuilder.Item
extends
implements org.elasticsearch.common.xcontent.ToXContentObject, Writeable
A single item to be used for a
MoreLikeThisQueryBuilder
.-
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
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.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionItem()
index, id)
Constructor for a given item / document requestindex, type, id)
Deprecated.index, type, org.elasticsearch.common.xcontent.XContentBuilder doc)
Deprecated.Types are in the process of being removed, useItem(java.lang.String,org.elasticsearch.common.xcontent.XContentBuilder)
instead.index, org.elasticsearch.common.xcontent.XContentBuilder doc)
Constructor for an artificial document request, that is not present in the index. -
Method Summary
Modifier and TypeMethodDescriptiondoc()
boolean
o)
[]
fields()
... fields)
int
hashCode()
id()
index()
index)
parse(org.elasticsearch.common.xcontent.XContentParser parser, MoreLikeThisQueryBuilder.Item item)
Parses and returns the given item.<,>
<,> perFieldAnalyzer)
Sets the analyzer(s) to use at any given field.routing()
routing)
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
type()
Deprecated.Types are in the process of being removed.type)
Deprecated.Types are in the process of being removed.long
version()
version(long version)
versionType(VersionType versionType)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.
, , , , , , ,
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
Item
public Item() -
Item
public Item(@Nullable index, id)Constructor for a given item / document request- Parameters:
index
- the index where the document is locatedid
- and its id
-
Item
public Item(@Nullable index, org.elasticsearch.common.xcontent.XContentBuilder doc)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
-
Item
public Item(@Nullable index, @Nullable type, id)Deprecated.Types are in the process of being removed, useItem(java.lang.String,java.lang.String)
instead.Constructor for a given item / document request- Parameters:
index
- the index where the document is locatedtype
- the type of the documentid
- and its id
-
Item
public Item(@Nullable index, @Nullable type, org.elasticsearch.common.xcontent.XContentBuilder doc)Deprecated.Types are in the process of being removed, useItem(java.lang.String,org.elasticsearch.common.xcontent.XContentBuilder)
instead.Constructor for an artificial document request, that is not present in the index.- Parameters:
index
- the index to be used for parsing the doctype
- the type to be used for parsing the docdoc
- the document specification
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
index
public index() -
index
public index) -
type
public type()Deprecated.Types are in the process of being removed. -
type
public type)Deprecated.Types are in the process of being removed. -
id
public id() -
doc
-
fields
public [] fields() -
fields
public ... fields) -
perFieldAnalyzer
public <,> perFieldAnalyzer() -
perFieldAnalyzer
public <,> perFieldAnalyzer)Sets the analyzer(s) to use at any given field. -
routing
public routing() -
routing
public routing) -
version
public long version() -
version
-
versionType
-
versionType
-
parse
public static MoreLikeThisQueryBuilder.Item parse(org.elasticsearch.common.xcontent.XContentParser parser, MoreLikeThisQueryBuilder.Item item) throwsParses and returns the given item.- Throws:
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
-
toString
public toString()- Overrides:
in class
-
hashCode
public int hashCode()- Overrides:
in class
-
equals
public boolean equals( o)- Overrides:
in class
-
Item(java.lang.String,java.lang.String)
instead.