search issue
-
Hi, I have an issue on this page
http://randall-payne-co-uk.stackstaging.com/people-new/
When I searched for eg ‘Tim’ it was bringing up search results that weren’t related to Tim. The plugin author for this searchable grid suggested that the search term was too short and to install relevanssi. I have installed your plugin, but now when I search for ‘Tim’ it says no results found.
Also the main search bar in the header of my site, when I search for blog posts, etc it doesn’t bring them up.
Are you able to help?
-
Have you tried the Relevanssi admin search (Dashboard > Admin search)? What kind of results are you getting there?
The main search in the header seems to work fine.
Hi sorry I had to deactivate it for a minute, I’ve reactivated it now if you want to try again and you will see what I mean
I’ve ticked the admin search box but still having the same problemI’ve updated a few pages since I submitted the ticket so I will walk you through what I’m doing again if that’s OK
http://randall-payne-co-uk.stackstaging.com/people/
I have searched for ‘Tim’
This brings up the search results page but doesn’t actually load Tim’s profile unless relavanssi is deactivated (the profiles are a custom post type, not sure if this is an issue at all?)I also have a custom search form here
http://randall-payne-co-uk.stackstaging.com/search-form/
With relavanssi deactivated, if I search for ‘Tim’ it brings up lots of profiles that aren’t relevant. When I activate relavanssi it doesn’t bring up any search results at allI’ve left the plugin turned on now
I mean the Relevanssi admin search under Dashboard > Admin search. Try that, does that get you the correct results?
Is Relevanssi set to index the
profilepost type?Ah sorry,
I tried searching for Tim under dashboard – admin and his profie page doesn’t come up here either.
Yes in the indexing settings I have profile tickedFirst step would be check whether this is an indexing problem or a searching problem.
Here’s some indexing debugging tips: https://www.relevanssi.com/knowledge-base/debugging-indexing-problems/
If it turns out to be a searching issue, then this is helpful: https://www.relevanssi.com/knowledge-base/debugging-relevanssi-searching-issues/
Hi, I did the indexing debugging when searching for Emma (for some reason when I now search for Tim he comes up.. :-S
Here is the indexing result
https://snipboard.io/9e4jE2.jpgI tried adding the below to my functions file as per the searching results tutorial but nothing seems to happen… I tried installing the query monitor plugin but I’m not too sure what to do :-S
add_filter( ‘relevanssi_modify_wp_query’, ‘rlv_check_parameters’ );
function rlv_check_parameters( $query ) {
var_dump( $query->query_vars );
exit();
}add_filter( ‘relevanssi_results’, ‘rlv_check_results’ );
function rlv_check_results( $results ) {
var_dump( $results );
exit();
}Here are instructions on what to do with Query Monitor: https://www.relevanssi.com/knowledge-base/debugging-with-query-monitor/
If those filters do nothing, that means your site search is not powered by Relevanssi at all. Those filter functions should halt the search right there, showing a blank white screen.
Hi, I’m not too sure I understand and I’m not too sure what I can do to try next… I’ve tried tweaking some of the relavanssi settings and the search and filter settings but now when I search for ‘Tim’ it brings up search results for Shaun and a couple of other people π
I tried following the instructions for query monitor but I don’t really understand itIf I perhaps take screenshots of all my settings are you able to see if anything looks incorrect your side?
Hope you can help..
Try adding this to your theme functions.php and rebuilding the index:
add_filter( 'relevanssi_disabled_shortcodes', function( $shortcodes ) { $shortcodes[] = 'us_grid'; return $shortcodes; } );Does that help?
Hi, thanks for your reply. I added the code but it didn’t do anything..
What is the post ID of the Emma Robinson post? 6562 or something else?
Settings screenshot won’t help much. If you run a search with Query Monitor enabled, open up the Query Monitor screen and go to Queries > Queries by Component, is Relevanssi mentioned at all?
If “Plugin: Relevanssi” appears on the list, click it, then in the “Caller” dropdown choose “relevanssi_search()” and send me a screenshot of what that brings up.
Hi, the ID of emma is 6398
Yes relavanssi comes up here
https://snipboard.io/dpQDw7.jpgHowever when I click it and go to the caller dropdown, I can’t see relevanssi_search()
https://snipboard.io/aT76N2.jpgThat’s the problem then: the contents for Emma Robinson are not indexed under ID 6398, but instead ID 6562. That’s why you can’t find the post. The problem is likely a shortcode that fetches other posts, that’s why I suggest disabling the
us_gridshortcode β that seems to be the most likely culprit.If you disable shortcode expansion completely in Relevanssi indexing settings and rebuild the index, the Relevanssi admin search should then get you the user profiles correct, I think. Is that so?
The topic ‘search issue’ is closed to new replies.