For given input i would like to match any term startswith the given input.
For example If i give #yo or ^oop or %ic it has to return the above document
query_string with field type text works for the above use case if no special char is there but with specical char it is not working. How to solve the usecase.
I used whitespace_analyser for keyword field.
The query not working fine for chars like ^, !, {, [, (, ), }, ] and /
Query used
In Elasticsearch, certain characters are considered special and need to be escaped with a backslash (\ ). These special characters are: + - = && || > < ! ( ) { } [ ] ^ " ~ * ? : \ / .
you can modify your query to escape the special characters:
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.