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.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SynonymRulefromXContent(XContentParser parser) inthashCode()id()synonyms()toXContent(XContentBuilder builder, ToXContent.Params params) validate()A simple validation of a synonym rule outside of the context of a specific analyzer.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:
toXContentin interfaceToXContent- Throws:
IOException
-
synonyms
-
id
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin 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.
-