Advice on taxonomy problem
-
Hi,
I’m having trouble getting the correct search results from Relevanssi. I’m creating a query from four form fields set by the user. The generated tax_query should flow through Relevanssi and return the correct results.
I haven’t fully grokked how Relevanssi works, but I thought maybe somebody could offer a suggestion on where to continue debugging, based on this situation:
When I look at what’s happening in
relevanssi_do_query()
, I can see that my tax query variables are coming through ok.When I trace out the following at the end of relevanssi_do_query()
print_r($query->query_vars['tax_query']);
I get this
These are the correct params (in my test case I’m only setting one of four arguments: I want to return all posts marked with an ‘English subtitles’ taxonomy term).
When I run a sql query directly on the db, I get 267 results where the English subtitles taxonomy term is set.
However, when I trace out
$query->post_count
at the end ofrelevanssi_do_query()
it only shows 36. Strange, I would think it should be 267.Futhermore, when I trace out
$query->tax_query
at then end ofrelevanssi_do_query()
, I get thisWhy would $query->tax_queries[“queries”] only show two of the four taxonomy query variables?
Thanks for any thoughts. I’m still learning WordPress so pardon the question if I’m missing something obvious to experienced users.
- The topic ‘Advice on taxonomy problem’ is closed to new replies.