Elasticsearch search with symbol "-"


(Артем Красковский) #1

Hi there, I have the following problem:
I have field "author" and in some documents value is "---".
And after search: /_search?q="---" result is empty. With usual values, search works correctly. What can be a solution for this?
Also, from the official doc: The reserved characters are: + - = && || > < ! ( ) { } [ ] ^ " ~ * ? : \ /
I tried to escape this symbols, using leading slash - still nothing in search results


(Артем Красковский) #2

Solved, by adding ".keyword" for fieldName in query from default field mapping


(system) #3

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