Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIndexToSynonymID ¶
AppendIndexToSynonymID will append the index name to the synonym's ID.
func RemoveIndexFromSynonymID ¶
RemoveIndexFromSynonymID will remove the index name from the synonym's ID
This function will return the raw ID and the index
Types ¶
type BaseSynonymStruct ¶
type BaseSynonymStruct struct {
Type SynonymType `json:"type"`
Synonym string `json:"synonym"`
Index string `json:"index"`
}
type SynonymType ¶
type SynonymType int
const ( OneWay SynonymType = iota // after Equivalent IndexPattern = "__index__" )
func (SynonymType) MarshalJSON ¶
func (o SynonymType) MarshalJSON() ([]byte, error)
func (SynonymType) String ¶
func (o SynonymType) String() string
String is the implementation of Stringer interface that returns the string representation of ActionType type.
func (*SynonymType) UnmarshalJSON ¶
func (o *SynonymType) UnmarshalJSON(bytes []byte) error
type Synonyms ¶
type Synonyms struct {
// contains filtered or unexported fields
}
Synonyms plugin saves default settings for search, aggregations, result, language.
func Instance ¶
func Instance() *Synonyms
Instance returns the singleton instace of Synonyms plugin. Note: Only this function must be used (both within and outside the package) to obtain the instance synonyms in order to avoid stateless instances of the plugin.
func (*Synonyms) AlternateRoutes ¶
Expose plugin specific routes
func (*Synonyms) ESMiddleware ¶
func (s *Synonyms) ESMiddleware() []middleware.Middleware
ESMiddleware ES middlewares
func (*Synonyms) InitFunc ¶
InitFunc is a part of Plugin interface that gets executed only once, and initializes the dao, i.e. elasticsearch before the plugin is operational.
func (*Synonyms) Name ¶
Name is a part of Plugin interface that returns the name of the plugin: 'synonyms'.
func (*Synonyms) RSMiddleware ¶
func (s *Synonyms) RSMiddleware() []middleware.Middleware
RSMiddleware RS middlewares
type SynonymsStruct ¶
type SynonymsStruct struct {
Id string `json:"_id"`
BaseSynonymStruct
}
SynonymsStruct struct for settings request