In my Elasticsearch environment, for different asterisk (*) wildcard positions in string I am getting below error:
ES Exception: [HTTP Status Code: [400]
ORIGINAL_EXCEPTION: [Elasticsearch.Net.ElasticsearchClientException: The remote server returned an error: (400) Bad Request. Call: Status code 400 from: POST/_search?typed_keys=true&routing=. ServerError: Type: search_phase_execution_exception Reason: "all shards failed" ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
Different wildcard scenarios causing error:
- If any word in search string has length more than 1000 and ends with , ex: abc
- If any word in search string has length more than 400 and starts with *, ex: *abc
- if any word in search string has length more than 300, starts with * and ends with *, ex: abc
Are these string lengths not supported by ES or is it something my elasticsearch setup specific? Any suggestion on how can I fix the issue?
Also I want to know if there is any such search string limit on ES side?
ES version: 8.14