How to restrict search to selected fields when using q param

Hi team,

Our users generally use q param to search people. E.g. q="Matthew North" or just q="North". This results in our ES searching across all our 100+ fields defined in the schema and chances are it returns even those users who have region="North America". How do I restrict my search in such a case where we can limit the search only to firstName, lastName, middleName instead of all 100+ fields

What version of Elasticsearch are you using?

We are using Elasticsearch 7.10.0. Sorry forgot to mention that earlier.

Elasticsearch 7.10 is EOL and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

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