I am working with ElasticSearch version 1.2.3
I integrated WordNet 3.0 as a Synonym database for the ElasticSearch synonym analyzer. (Full installation of WordNet: setup, creation, installation)
I added the following code to the ElasticSearch index settings (index name local_es )
curl -XPUT 'localhost:9200/local_es/_settings' -d '{ "settings" : { "analysis" : { "analyzer" : { "synonym" : { "tokenizer" : "lowercase", "filter" : ["synonym"] } }, "filter" : { "synonym" : { "type" : "synonym", "format": "wordnet", "synonyms_path": "analysis/wn_s.pl" } } } } }'
I also updated the display with the following code:
enter code here curl -XPUT 'localhost:9200/local_es/shadowpage/_mapping' -d '{ "shadowpage" : { "shadowPageName" : { "enabled" : true, "analyzer" : "synonym" }, "properties" : { "name" : { "type" : "string", "index" : "analyzed", "analyzer" : "synonym" } } } }'
Everything works as expected.
As you can see, ElasticSearch takes its data from the path to the file analysis / wn_s.pl
The wn_s.pl file is a WordNet prolog containing all database synonyms.
How to add new synonyms to the database? Can I add it directly to a WordNet database? Or in the wn_s.pl file?
elasticsearch wordnet synonym
raven99
source share