Partial search allowing escape characters


(Arshbeer Singh) #1

Pardon me if it sounds silly. Actually I have just started working on elastic search and wanted to implement partial search and did the same using query string but now this does not accept the special characters. I tried various combinations of escape characters but no success..

GET _search
{
"query": {
"query_string": {
"query": "DF\- as",
"fields": [
"iD",
"description2",
"name",
"matchCode"
],
"default_operator": "AND"
},
"analyzer": "whitespace"
}
}

now i had added wildcards for partial search and it worked fine but i am not able to search on these special characters.

Any help is greatly appreciated! Thanks..


(system) #2