I am working on a website that uses Elasticsearch for searching functionality, and the project has been working fine, but I am facing this error. You can see the error in the attached screenshot.
I just want to know if there is code related to this, so why am I facing the error
Please help me with the solution
Hi @Mihir_Mistry,
Are you trying to perform an aggregation? Or perhaps sorting? That error is to do with the fact that the type of the field you are trying to use for that kind of operation is of type text
which isn't compatible with the operation. While you can set the fielddata
option on the index settings to true, I would recommend adding keyword fields for those fields to your index (if there is no .keyword
field already available).
Hope that helps!