This is the page: hidden link.
We show the complete property addresses on the detailed behind pages, which is accessible for logged-in users only.
Visitors should be able though to search a property on address (filter "eigendom zoeken").
We applied the field setting "search in posts content and title", however the properties are not found on complete address.
Example: Tijllaan 11 Schoten.
Hi,
Thank you for contacting us and I'd be happy to assist.
By default, the "Text search (title and content)" filter uses WordPress built-in search feature, which only includes the text from the post titles and the content.
I couldn't find any "Eigendommen" posts in the admin area, which include the text "Tijllaan", however, there are some with the text "Schoten".
This is why, when you'll search by the text "Schoten" on the front-end search page, you'll see the results.
A simpler solution for this is to make sure that the text that you're adding in the "Adres" custom field, is also included in the post's title. For example post title "Bouwgrond, Schoten" will become "Bouwgrond, Tijllaan 11 Schoten".
The other option is to use the Relevanssi plugin, which can extend the default search to include the text from the custom fields as well:
https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/
regards,
Waqar
I followed every step here: https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/.
The only thing I did different is setting the custom fields to "all' instead of "some" as you can only add the following kinds of fields to Relevanssi’s index: Single line, Multiple line, WYSIWYG AND not "address".
However processing a search on "Tijllaan Schoten" other properties than this one are shown as well.
What am I doing wrong?
I followed every step here: https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/
The only thing I did different is setting the custom fields to "all" instead of "custom" as Relevanssi does not index on "Address".
However when processing the search "Tijllaan Schoten" 4 results (of which 3 are not relevant) are shown instead of 1.
What am I doing wrong here?
Thanks for sharing the update and this is the expected behavior.
When I search through that view ( {yourwebsite.com}/eigendom-zoeken/ ) using the text "Tijllaan Schoten", it shows me 3 results, because one of the searched word "Schoten" exists in all 3 of them.
If you'd like to change the search's behavior to show only the results, where 'all' the searched words are available, then please go to WP Admin -> Settings -> Relevanssi -> Searching (tab) and change the "Default operator" from "OR" to "AND".
I made that change.
Searching for Tijllaan Schoten, it works well.
But if I search for Tijllaan "12" Schoten (instead of Tijllaan "11" Schoten) it also shows the property where it should not.
Since all custom fields are set for indexing, '1' and '2' can be coming from any of the visible or hidden custom field values.
From the settings page at WP Admin -> Settings -> Relevanssi -> Searching (tab), you can experiment with different settings to make the search less or more precise. For more precise and in-depth information about the search algorithm that the Relevanssi plugin uses, you can consult the plugin's official support forum:
https://wordpress.org/support/plugin/relevanssi/
If your goal is to strictly limit the search scope to exactly what is saved in the "Adres" custom field, then a better alternative would be to include its own search field in the view, where all the saved values for that field are available as a dropdown option.
My issue is resolved now.