2

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?

Matthias Redl-Mann
  • 1,921
  • 11
  • 21

1 Answers1

3

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 3.1.9.1 which prevented this from working. Thanks to Romain poirier and Brandon Kelly (https://github.com/craftcms/cms/issues/3837).

Matthias Redl-Mann
  • 1,921
  • 11
  • 21