Error from ES Querystring query when fields are mentioned

Hi ,
I have below query which is working fine when I don't specify fields , but when I want to search on few fields then I am getting something like All Shards failed...can you please resolve my issue..
Below is my query...



Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:


This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

Could you share the error log and/or the response from elasticsearch?

Thanks @dadoonet I am new to this forum, will surely follow the guidelines from now on :slight_smile:
Coming to the problem , What I understood is when I mention 1 or 2 fields in fields array I am recieving response. but when I mention huge set of fields(I dont find exclude fields option either because my exclude list is very less) I am getting error.
I believe this could be due to lenght of query ...can you please help me to come out of this.

Please read the instructions I gave. This is not formatted as you can see.



is different from:


Please adjust your code.

And please answer my question:

Hi @dadoonet , from the error logs I found that the fields mentioned are of different types like long,boolean and date but I am using wild card search which why it is failing. I changed the dynamic template by storing everything as keyword to resolve the issue. can you confirm if this approach will have any issues in future..for me wild card search is mandatory.

If running (very) slow searches is not an issue then may be that's correct.
But I always prefer running fast queries so I prefer using things like ngram based analyzers.

Thanks for the response . I will surely go through the nggram analyzers for partial search.

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