Skip Navigation

[Resolved] Search with just a few letters entered

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

Problem:
Does a text search do partial matches with a few letters or just complete words?

Solution:
The standard WordPress search will do partial matches, and normally searches the post title and post body. (If you create a View with a text search you can specify just the title, or both.)

If you want to search custom field text, too, you'll need the Relevanssi plugin.

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

This support ticket is created 6 years, 10 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.

Our next available supporter will start replying to tickets in about 0.77 hours from now. 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 Aman Motwane 6 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#606080

I’m not sure if I’m understanding this right:

When I search on a post title, I don’t need to put in the full word; the Search will find everything pertaining to even if a few letters are entered. Is this correct?

Is this same thing possible with other fields that are not the post title? If yes, how do I do this? Thanks

#606156

Nigel
Supporter

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

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

Hi Aman

You haven't specified where you are searching. If you are using standard WordPress search (e.g. your theme provides a search bar) that will normally search the post title and the post body, and, yes, it will search partial words if you enter just a few letters.

If you create a Views custom search and include a text search filter then you can specify whether to search just the post title or both the post title and post body: https://toolset.com/documentation/user-guides/filtering-views-for-a-specific-text-string-search/

If you want to include other fields, i.e. custom fields, in the search, then for that you would need to add the Relevanssi plugin and set it up to work with Toolset, as described here: https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

#606561

Thanks, Nigel, that worked like charm!