It may be possible to use the posts_where, posts_join, and posts_orderby filters to modify a WP search query, but let's exhaust all options with Relevanssi first. I turned Relevanssi on and modified the text search Query Filter as shown in the attached screenshot. It looks like even though you tell Relevanssi to index the terms in Relevanssi settings, the Query Filter option here must be updated to search title, body and custom fields. The option doesn't mention terms, but it seems to be respecting the searches I enter like this one for labrador:
hidden link
Can you check again and let me know your thoughts?
If you reduce your search radius to 30mi (or rather, any value less than 148mi), the post titled "Midnight" should not show up, as the distance between Harborcreek, PA and Pittsburgh, PA is ~148 miles.
hidden link
As you can see from the results, Midnight still shows up, even when the radius limit is 30 miles, and even after I decided to test extremes by setting the value to Midnight's address field to the Eiffel Tower's location in Paris, France.
Okay thanks. I'm going to escalate this to my 2nd tier support team for further investigation, because it appears that Relevanssi and the distance filter are not working together correctly in text searches. Please stand by and I will update you as soon as I have more information to share.
Here's the information I received. The integration between Toolset text search and Relevanssi is officially limited to custom fields, post title, and post content, as described in the documentation here: https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/
However, it does seem to work in some cases. We will discuss the issue with our developers to see what can be possible here, but since we're close to a launch of a major release, the Release Candidate is the main priority of the team.
So, is there a way to make it work without Relevanssi? Is there something we can do programmatically that'll allow the text search to also look into taxonomy terms?
From my understanding, Relevanssi is the official supported search mechanism for Toolset. Isn't it a rather large oversight for it not to support one of Toolset's core features?
Right now, I am quickly reaching a deadline, and the expectation of a location based search is the primary function of this site. I simply cannot afford to wait for official implementation at this time, isn't there a way we can find a solution for this? Do you know of any other search plugins that might be of use?
I have found a solution to my problem. Perhaps this problem should be addressed in later releases, however for the time being, I found the plugin WP Extended Search to fulfill my needs. https://wordpress.org/plugins/wp-extended-search/
It allows me to select what taxonomy terms and meta fields I wish to specifically search in, while not interfering with the distance filtering feature provided by Toolset.
Thanks for your help, anyway.
FYI our developers plan to release a fix for the Relevanssi text search and distance filters compatibility issue in Maps 1.5.