"BrandDesc": {
"type": "string",
"index": "not_analyzed",
"analyzer": "synonym",
"fields": {
"raw": {
"type": "string",
"analyzer": "synonym"
}
}
},
when i search with the query with normal query string it's giving me count say 1200
GET newpcdb_anlyz/_search
{
"query": {
"query_string": {
"query": "engine"
}
}
}
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"
}
}
}
M I missing something
Search matching occurs when the tokens in your search match those in your index.
The tool for debugging how a query is (or isn't) matching is the explain API [1].
It should show you the tokens your query is executing at a low level.
If some of the tokens are unexpected you can use the analyze API [2] to debug what tokens your query and your document produce.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.