Search_analyzer explanation


(jdolecki) #1

Hey,

I'm curious about the difference between specifying a search_analyzer on a field and specifying an analyzer in a query_string call to the API. My indication is that they are the same. So, if my mapping looks like the following:
...
"mapping": {
"boost": 1.0,
'index': 'analyzed',
'store': 'yes',
"type": "multi_field",
"fields": {
"{name}": {"type": "{dynamic_type}"},
"ngram": {
"include_in_all": False,
"index_analyzer": "ngram",
"search_analyzer": "standard",
"type": "string"
},
"edgengram": {
"include_in_all": False,
"index_analyzer": "edgengram",
"search_analyzer": "standard",
"type": "string"
},
"snowball": {
"include_in_all": False,
"analyzer": "snowball",
"type": "string"
}
}

then my custom fields will be analyzed by my custom analyzers, and a search query will be analyzed by the standard analyzer?


(system) #2