Skip Navigation

[Resolved] Include text field from a select box field on Relevanssi search

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to include select fields in Relevanssi searches.

Solution:
Select fields are stored in the wp_postmeta table as simple strings, and so can be searched by Relevanssi just like other string-based custom fields.

Relevant Documentation:
https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by selmoK 6 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#618836

I need to include a select box field on a CRED form. Relevanssi doesn´t have an option for including select box fields on searches, only for text fields.
How can i use a field with pre-filled options for the users selecting and also include this field on searches?

#618936

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Select boxes as stored as text in wp_postmeta, and so Relevanssi should have no problems indexing them.

When posts are saved with an option selected, that option is stored as plain text.

Some other fields, such as checkboxes fields, are stored in a proprietary serialised array format that Relevanssi would be unable to index, but your select field options shouldn't be a problem, provided in the settings you have told Relevanssi to index custom fields.

https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

#619281

Thanks