Need help with elasticsearch-analysis-dynamic-synonym?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

bells
268 Stars 136 Forks 88 Commits 49 Opened issues

Description

The dynamic synonym plugin adds a synonym token filter that reloads the synonym file(local file or remote file) at given intervals (default 60s).

Services available

!
?

Need anything else?

Contributors list

# 297,833
Java
31 commits
# 473,769
PHP
Shell
C
sms
4 commits
# 462,677
Java
JavaScr...
Node.js
Jenkins
4 commits
# 352,815
Java
Python
2 commits
# 59,775
Java
elastic...
1 commit
# 185,717
hugo
Go
Shell
elastic...
1 commit
# 30,521
Java
HTML
dapper
Applica...
1 commit

Dynamic Synonym for ElasticSearch

The dynamic synonym plugin adds a synonym token filter that reloads the synonym file (local file or remote file) at given intervals (default 60s).

Version

dynamic synonym version

ES version
master 7.x -> master
6.1.4 6.1.4
5.2.0 5.2.0
5.1.1 5.1.1
2.3.0 2.3.0
2.2.0 2.2.0
2.1.0 2.1.0
2.0.0 2.0.0
1.6.0 1.6.X

Installation

  1. mvn package
  2. copy and unzip

    target/releases/elasticsearch-analysis-dynamic-synonym-{version}.zip
    to
    your-es-root/plugins/dynamic-synonym

Example

{
    "index" : {
        "analysis" : {
            "analyzer" : {
                "synonym" : {
                    "tokenizer" : "whitespace",
                    "filter" : ["remote_synonym"]
                }
            },
            "filter" : {
                "remote_synonym" : {
                    "type" : "dynamic_synonym",
                    "synonyms_path" : "http://host:port/synonym.txt",
                    "interval": 30
                },
                "local_synonym" : {
                    "type" : "dynamic_synonym",
                    "synonyms_path" : "synonym.txt"
                },
                "synonym_graph" : {
                    "type" : "dynamic_synonym_graph",
                    "synonyms_path" : "http://host:port/synonym.txt"
                }
            }
        }
    }
}

Configuration

type
:
dynamic_synonym
or
dynamic_synonym_graph
, mandatory

synonyms_path
: A file path relative to the Elastic config file or an URL, mandatory

interval
: Refresh interval in seconds for the synonym file, default:
60
, optional

ignore_case
: Ignore case in synonyms file, default:
false
, optional

expand
: Expand, default:
true
, optional

lenient
: Lenient on exception thrown when importing a synonym, default:
false
, optional

format
: Synonym file format, default:
''
, optional. For WordNet structure this can be set to
'wordnet'

Update mechanism

  • Local files: Determined by modification time of the file, if it has changed the synonyms wil
  • Remote files: Reads out the
    Last-Modified
    and
    ETag
    http header. If one of these changes, the synonyms will be reloaded.

Note: File encoding should be an utf-8 text file.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.