How to exclude certain fields from .search() I have an event section in my website with a couple of fields on the entries and one of them is a "related events" field where I can select a other event entries to be shown at the end of the page.

I also use the .search() function to search within events and it happens that events are listed in the results of searches for a certain keyword, where the only appearance is within the related events, which is unwanted behavior.

What I need is to exclude this one field where I can select the related events from the search index.

How can this be solved?
Starting with Craft 3.1 the solution is easy. In the field definition there is a new checkbox: "Use this field's value as search keywords". Uncheck and you're done!



Please note that there was a bug until Craft 3.1.9.1 which prevented this from working. Thanks to Romain poirier and Brandon Kelly (https://github.com/craftcms/cms/issues/3837).