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?

1 Answer 1


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!

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.