Search with analyzer

Here is my index setting and mapping

analysis": {
"filter": {
"synonym": {
"type": "synonym",
"synonyms_path": "D:\MyElasticSearch\elasticsearch-1.5.2\config\synonyms.txt",
"ignore_case": "true"
}
},
"analyzer": {
"synonym": {
"filter": [
"synonym"
],
"tokenizer": "whitespace"
}
}
},

--mapping

"BrandDesc": {
"type": "string",
"index": "not_analyzed",
"analyzer": "synonym",
"fields": {
"raw": {
"type": "string",
"analyzer": "synonym"
}
}
},

whe i search with the query with normal query string

GET newpcdb_anlyz/_search
{
"query": {
"query_string": {
"query": "engine"
}
}
}

its giving me count say 1200

but same when i query with analyzer synonyms its giving me less count,(it should give more than 1200 as it will include engine synonyms also in search)

GET newpcdb_anlyz/_search
{
"query": {
"query_string": {
"query": "engine",
"analyzer": "synonym"
}
}
}

Iam I missing something

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.