I'm trying to figure out the correct mapping for searching for exact values
but lowercased. I thought this would work:
....
"exact_lowercase": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "keyword"
}
......
and the mapping of the field:
"TITLE": {
"fields": {
"exact_lowercase": {
"search_analyzer": "keyword",
"index_analyzer": "exact_lowercase",
"type": "string"
},
...some other mapping....
},
"type": "multi_field"
}
but when i do a termquery or query_string query i'm not getting any hits,
for example "steel wheels". The original value: "Steel Wheels". What am i
doing wrong. The idea for the searchstrategy is to first match on exact
lowercase strings, if nothing is found we do a partial match.
I'm trying to figure out the correct mapping for searching for exact values but lowercased. I thought this would work:
....
"exact_lowercase": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "keyword"
}
......
and the mapping of the field:
"TITLE": {
"fields": {
"exact_lowercase": {
"search_analyzer": "keyword",
"index_analyzer": "exact_lowercase",
"type": "string"
},
...some other mapping....
},
"type": "multi_field"
}
but when i do a termquery or query_string query i'm not getting any hits, for example "steel wheels". The original value: "Steel Wheels". What am i doing wrong. The idea for the searchstrategy is to first match on exact lowercase strings, if nothing is found we do a partial match.
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.