Synonym configuration


(paul) #1

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 elasticsearch+unsubscribe@googlegroups.com.
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.


(paul) #2

I got the answer by searching Google groups.

On Tue, Jan 21, 2014 at 10:55 AM, paul avinashpaul85@gmail.com 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
elasticsearch+unsubscribe@googlegroups.com.
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 elasticsearch+unsubscribe@googlegroups.com.
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.


(system) #3