Skip Navigation

[Resolved] when I query taxonomies with with relevanssi only post title searched

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

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 8 replies, has 2 voices.

Last updated by davidm-13 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1119815

Tell us what you are trying to do?
This is a continuation of a previous thread https://toolset.com/forums/topic/views-text-search-box-returns-relevanssi-search-results-on-a-separate-page/ which I thought was solved but realized still has the following problem:

I want to search custom posts with taxonomies and custom fields using views query and the Relevanssi free plugin.
I've specified in Views that I want to search child posts and their parent.
I've built the Relevanssi index to include 3 taxonomy fields and a custom field of the child posts.
My problem is the search only returns results from the child post title ignoring the taxonomies and custom fields that belong to the post.
Thanks for any help
David

#1119911

Nigel
Supporter

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

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

Hi David

I just re-read the previous thread.

Can we be clear here, you have a one-to-many relationship between plants << complaints.

Your View specifies complaints as the Content Selection (i.e. you are querying complaints), even though in the output section you will be outputting some fields of the parent plant posts.

The taxonomy and custom fields you want to be included in the search belong to complaints, and your Relevanssi settings are set to include the taxonomy and custom fields in the search index.

Then when you enter a search term the View is not finding complaint posts that have the taxonomy or custom fields which include the search term text.

Is that an accurate description of your set up and the problem?

#1120029

Hi Nigel,
Yes that's an accurate description of the setup and the problem.

David

#1120184

Hi Nigel,
Just noticed that if I enter the taxonomy or custom field terms into the default wordpress search box, (top right of the screen), I receive the complaint title for all posts containing the terms.
So it appears the Views searchbox is not treated the same as the wordpress default searchbox.

#1120655

Nigel
Supporter

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

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

David, can I get access to see it happening on your site first, and then when I've satisfied myself that everything is set up as expected I can try to reproduce the problem on my own test site?

I'll mark your next reply as private to get credentials from you.

#1120807

Nigel
Supporter

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

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

Screenshot 2018-10-04 at 15.38.43.png

David

On your test View you have a Query Filter which will prevent any posts being returned, see the screenshot.

I'm not sure what your intention is but that message indicates the View will return no results (because no other post types are being queried).

Regarding no initial results, that comes up quite often in the forums and you can find threads with solutions like this one: https://toolset.com/forums/topic/how-to-show-no-initial-results-on-a-view-until-a-filter-is-set/

If you have problems implementing that, please create a specific ticket for that issue, thanks.

#1120825

Hi Nigal,
What does "Filter out posts because they are not hierarchical" mean? - what is a hierarchical post?
You know what I'm trying to do, can you give me an idea how to avoid this message . As I said if I use the wordpress default search box (with Relevanssi) then it works, so why is the toolset query not returning any results?

#1121016
search-without-error.png

Hi Nigel,
The Query / filter in the screenshot seems to work, returning results from taxonomies and custom fields. Maybe help somebody in the future.

Thanks for your help
David

#1121021

My issue is resolved now. Thank you!