Package org.elasticsearch.search
Class SearchExtBuilder
java.lang.Object
org.elasticsearch.search.SearchExtBuilder
- All Implemented Interfaces:
NamedWriteable
,VersionedNamedWriteable
,Writeable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
public abstract class SearchExtBuilder
extends Object
implements VersionedNamedWriteable, org.elasticsearch.xcontent.ToXContentFragment
Intermediate serializable representation of a search ext section. To be subclassed by plugins that support
a custom section as part of a search request, which will be provided within the ext element.
Any state needs to be serialized as part of the
Writeable.writeTo(StreamOutput)
method and
read from the incoming stream, usually done adding a constructor that takes StreamInput
as
an argument.
Registration happens through SearchPlugin.getSearchExts()
, which also needs a CheckedFunction
that's able to parse
the incoming request from the REST layer into the proper SearchExtBuilder
subclass.
VersionedNamedWriteable.getWriteableName()
must return the same name as the one used for the registration
of the SearchPlugin.SearchExtSpec
.- See Also:
-
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 TypeMethodDescriptionabstract boolean
The minimal version of the recipient this object can be sent toabstract int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContent
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
Methods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
getWriteableName
-
Constructor Details
-
SearchExtBuilder
public SearchExtBuilder()
-
-
Method Details
-
hashCode
public abstract int hashCode() -
equals
-
getMinimalSupportedVersion
Description copied from interface:VersionedNamedWriteable
The minimal version of the recipient this object can be sent to- Specified by:
getMinimalSupportedVersion
in interfaceVersionedNamedWriteable
-