java.lang.Object
org.elasticsearch.synonyms.SynonymRule
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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, EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static SynonymRule
fromXContent
(XContentParser parser) int
hashCode()
id()
synonyms()
toXContent
(XContentBuilder builder, ToXContent.Params params) validate()
A simple validation of a synonym rule outside of the context of a specific analyzer.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
SYNONYMS_FIELD
-
ID_FIELD
-
-
Constructor Details
-
SynonymRule
-
SynonymRule
- Throws:
IOException
-
-
Method Details
-
fromXContent
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
synonyms
-
id
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
validate
A simple validation of a synonym rule outside of the context of a specific analyzer. Adopted from org.apache.lucene.analysis.synonym.SolrSynonymParser, with modifications not to invoke analyze method.- Returns:
- null if the synonym rule is valid, otherwise return the error message.
-