• I have an ACF custom field called “author” (I know that’s redundant, but not to be confused with the default “author” of a post). I’ve added that as a custom field to be searched, but the field value is not being indexed. It’s a ‘relationship’ field type. Could the field type be why the search engine isn’t indexing the field results, or could it be because the field name is “author”? Note that other custom fields that are text or textarea field types are successfully being indexed and search results return as expected.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gcgroup

    (@gcgroup)

    Further to this, I did a little experimenting and it does seem to be the ‘relationship’ field type, set to Post Object as the return format, that is the issue. So a general search of the person’s name will not return a result, only the related post ID. I assume I’m on the right track here: https://www.relevanssi.com/knowledge-base/indexing-acf-relationship-content/

    Plugin Author Mikko Saari

    (@msaari)

    Yes, that’s the problem: Relevanssi doesn’t see the post object, just the ID, and even the post object would not help, because Relevanssi expects a string.

    So, following those instructions, you need to come up with a filter that will take the post ID (are these authors posts?) and convert that to a string that contains the data you want Relevanssi to index.

    If you can tell me which parts of the post (and confirm that it’s a post, and not a user profile) you want Relevanssi to index, I can help with the filter function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom field types added to Relevanssi’ is closed to new replies.