Also, I tried this:
curl -XPUT 'localhost:9200/test/_settings' -d ' > { > "index" : { > "analysis" : { > "analyzer" : { > "synonym" : { > "tokenizer" : "whitespace", > "filter" : ["synonym"] > } > }, > "filter" : { > "synonym" : { > "type" : "synonym", > "synonyms_path" : "analysis/synonym.txt" > } > } > } > } > }' Which gives the response : {"acknowledged":true} , but it still didn't change the outcome when querying On Thursday, January 22, 2015 at 12:57:51 PM UTC-8, james rubinstein wrote: > > Hi all, > I'm new to using ES, but have so far found the process quite intuitive. > I've installed ES, set up an index, indexed a bunch of JSON documents, and > I can search them. Hooray! > However, I want to start using synonyms for a few queries. I'd like to do > this at query time using a synonym file. How can I install the synonym file > and have ES read it? > I'm using elasticsearch-1.4.1 on Mac OSX locally. > > I've read through the docs > <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-update-settings.html> > but > I still don't understand what to do because I'm still not seeing queries > that use the synonym I've defined. > > > > > POST /test/_settings > { > "index" : { > "analysis" : { > "analyzer" : { > "synonym" : { > "tokenizer" : "whitespace", > "filter" : ["synonym"] > } > }, > "filter" : { > "synonym" : { > "type" : "synonym", > "synonyms_path" : "analysis/synonym.txt" > } > } > } > } > } > > My synonym file has one line: > > "clementine => clementine,mandarin,orange,citrus" > > When I search for "Clementine" on my index I get 3 results, searching for > "Orange" gets me 66. > > Thanks, > JR > > > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a887f420-b04b-4d5d-80aa-14c120fb9da3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.