Skip Navigation

[Resolved] No Relevanssi Search Results after update

This support ticket is created 7 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.

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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 9 replies, has 2 voices.

Last updated by Beda 7 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#409068

Till the last update, my custom search with Relevanssi-Plugin did work correctly. After the last updates, the page is not showing any search-results. I disabled Views- and Layouts-Plugin and Relevanssi is working fine. So I guess, there is a new conflict.

Perhaps this will help you to narrow the problem:
hidden link

Please for help!

#409201

Are you using some instance of Views in the Search?

Views and Relevanssi will not work properly together.

While Views parametric Search addresses a specific table (posts or post meta/taxonomy), Relevannsi.

One of the few reasons to use Relevannsi AND Views was (in past):

1. Our search box can search in post-title and post-content, but it can not search in custom field values. This is because adding it might have some side effects:
- first, you need to join the postmeta table. As our parametric searches usually include more than one filter, you might be joining it twice. It might be doable to check in advance and avoid this, but there might be corner cases we can not detect.
- second, because searching a field value would likely exclude all posts with no value on that field because that is how SQL works with the existing database schema that WordPress uses.
- third, because it could mess up the sorting of the results if they are set to be ordered by a custom field.

2. Relevanssi is able to search by custom field values because it adds custom tables to the site. There, everything is stored in a different way with indexes pointing to all kind of content at once. They store titles, content, fields and terms in an all-in-all table where they can perform the search.

3. Now, when doing a query for a View, we deactivate Relevanssi if it is installed so we perform the native WordPress query itself because it was breaking Views queries when they contained a search filter:
https://toolset.com/forums/topic/relevanssi-premium-conflict-with-parametric-search/

The conclusion is that the most likely scenario is that advanced search plugins, which involve "messing" with the WordPress query directly and/or need custom tables, will not work by default with our search filter for a parametric search.

#409316

Hmmm, not the answer I was hoping for … 😉

Yes, I need a site-wide search which can search in all of my custom post types. In my custom post types there are the most relevant informations of my website. There is no such feature within Toolset, am I right? So I decided to give Relevanssi a shot. And it did a good job for me until your last Toolset-Update. That's strange to me.

Besides that, Relevanssis feature to highlight all the found words on the search-page and on the following pages is really great. Makes life easier for my users. But I'm okay to give up on that – but I really need custom post type searching!

So what do you suggest? Is there another plugin, which is handling search-results with custom post types and is working fine with toolset?

#409334

With Views, you can search easily through ALL Custom Post Types, but, you can not search in a "Content Search" (that's the "Text Search Field") of Views, for data coming from other things than Post Title and Post Body.

For Fields, and taxonomies, you need "standalone" Filters.
https://toolset.com/documentation/user-guides/views/
https://toolset.com/documentation/user-guides/front-page-filters/

Maybe you can achieve your gaol with this?

#409341

Hmmm, have to check on that. Please leave this thread open, until I tried it out …
Thanks, Beda!

#409345

Might I ask, so we can learn from this and maybe make it more clear in our DOC:

Why did you assume you can not search Custom Posts with Views?

This is actually the "core" of Views Plugin.

#409352

I don't know yet, if I did understand your last post, so I wanted to check it out first ...

Am I right, that a views text-search doesn't bring up search-results for search-strings, when they only would be found in one of my custom post fields and not in the wp-standard-fields of my custom-post-type? Then that's a big problem for me … Because in these fields there are most of my relevant website-tags.

And the "standard-wp-search-box-widget" cannot find search-results from Toolsets Custom Post Types, am I right? This would be the easiest way to implement a site-wide text-search-box with one search-results-page. Isn't it? Or is there such an easy way with parametric search, which I overlook?

#409355

Yes, as I elaborated:
https://toolset.com/forums/topic/no-relevanssi-search-results-after-update/#post-409334

This is not possible with Views.
It requires Custom Code and is not reccommended due to performance issues.

1. "wp-standard-fields" of my "custom-post-type" do not exist this way.
The Views Content Search (Text Field search) will query the Post TITLE and Post BODY.

You can have a text Search for Custom Fields but those need to be added as singel Filters to your Parametric Search.

2. "standard-wp-search-box-widget" cannot find search-results from Toolsets Custom Post Types

Whenever you create a Post Type with Types, you should have by default the option "publicly_queryable" checked and "exclude_from_search" unchecked. This should make your Post type querieable by the native WordPress Search fucntion.
https://codex.wordpress.org/Function_Reference/register_post_type
https://toolset.com/documentation/user-guides/create-a-custom-post-type/

This are the possible approeaches with Types or / and Views.

#409366

Okay, thanks again, Beda, I see a bit more clearly, what's it about. But I have to dig deeper in your documentation, which you mentioned above. Don't know yet, if one of the solutions will do the trick for me. I will check it out and come back …

#409577

Sure.
Please let me know if you have any questions or need any help with Toolset/Views.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.