Synonym configuration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Synonym configuration

paul
Hi ,

I read about in lot of places That There are two approaches when working with synonyms :

  • expanding them at indexing time,
  • expanding them at query time.

Expanding synonyms at query time is not recommended since it raises issues with :

  • scoring, since synonyms have different document frequencies,
  • multi-token synonyms, since the query parser splits on white spaces.
so to configure expanding synonym ant index time in elastic search what is the configuration.
right now my configuration is as below , i am using synonym filter both in index analyzer and query analyzer so that means i am expanding index time and query time.

"name":{
               "type":"string",
      "index_analyzer" : "autocomplete_index", 
"search_analyzer" : "autocomplete_search"
            },

{
   "settings":{
      "analysis":{
         "analyzer":{
    "synonym":{
               "tokenizer":"whitespace",
               "filter":[
                  "lowercase",
                  "syns_filter"
               ]
            },
      "autocomplete_search":{
               "type":"custom",
      "tokenizer":"whitespace",
               "filter":[
                  "lowercase",
                  "syns_filter",
 "stop"
               ]
            },
            "autocomplete_index":{
               "type":"custom",
               "tokenizer":"whitespace",
               "filter":[
                  "lowercase",
 "syns_filter",
 "stop",
                  "my_edgeNgram"
               ]
            }
         "filter":{
            "syns_filter":{
               "synonyms_path":"synonyms/synonym_collegename.txt",
               "type":"synonym",
      "ignore_case":true,
      "expand":false
            }
}
}}}}

-paul

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1c21cd11-eb92-47b5-b695-61b33bd256fa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Synonym configuration

paul
I got the answer by searching Google groups.


On Tue, Jan 21, 2014 at 10:55 AM, paul <[hidden email]> wrote:
Hi ,

I read about in lot of places That There are two approaches when working with synonyms :

  • expanding them at indexing time,
  • expanding them at query time.

Expanding synonyms at query time is not recommended since it raises issues with :

  • scoring, since synonyms have different document frequencies,
  • multi-token synonyms, since the query parser splits on white spaces.
so to configure expanding synonym ant index time in elastic search what is the configuration.
right now my configuration is as below , i am using synonym filter both in index analyzer and query analyzer so that means i am expanding index time and query time.

"name":{
               "type":"string",
      "index_analyzer" : "autocomplete_index", 
"search_analyzer" : "autocomplete_search"
            },

{
   "settings":{
      "analysis":{
         "analyzer":{
    "synonym":{
               "tokenizer":"whitespace",
               "filter":[
                  "lowercase",
                  "syns_filter"
               ]
            },
      "autocomplete_search":{
               "type":"custom",
      "tokenizer":"whitespace",
               "filter":[
                  "lowercase",
                  "syns_filter",
 "stop"
               ]
            },
            "autocomplete_index":{
               "type":"custom",
               "tokenizer":"whitespace",
               "filter":[
                  "lowercase",
 "syns_filter",
 "stop",
                  "my_edgeNgram"
               ]
            }
         "filter":{
            "syns_filter":{
               "synonyms_path":"synonyms/synonym_collegename.txt",
               "type":"synonym",
      "ignore_case":true,
      "expand":false
            }
}
}}}}

-paul

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/DTf-1Q0oaSw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1c21cd11-eb92-47b5-b695-61b33bd256fa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAO066G3%2BM1%3DZxijZ%3DtKDZp-QOJCpZnXz8VHhuDJaOcPP65NPKA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.