Hello,

i guess you should re-index your data because you have changed the mapping, 
and check if this analysis is run on your query AND on your indexed data.

I hope this helps you out,
TI

Le vendredi 23 janvier 2015 01:50:00 UTC+1, james rubinstein a écrit :
>
> Thanks Mark, 
> I believe that I have done that (but perhaps not)
>
> My file is located at
>
> /Users/jrubinstein/dev/elasticsearch/elasticsearch-1.4.1/config/analysis
>
> the YML files are in the 'config' directory. 
>
>
> On Thursday, January 22, 2015 at 3:37:39 PM UTC-8, Mark Walkom wrote:
>>
>> The path needs to be relative to the config home for ES.
>>
>> Take a look at 
>> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-dir-layout.html#default-paths
>>  
>> for where that would be on your installation.
>>
>> On 23 January 2015 at 08:45, james rubinstein <rubinste...@gmail.com> 
>> wrote:
>>
>>> 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 elasticsearc...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elasticsearch/a887f420-b04b-4d5d-80aa-14c120fb9da3%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/elasticsearch/a887f420-b04b-4d5d-80aa-14c120fb9da3%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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/aadf03af-02f1-41f9-b6fc-f8963efb25c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to