Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search Logic
This topic contains 2 replies, has 2 voices, and was last updated by cnganga 7 years, 1 month ago.
- AuthorPosts
- October 27, 2016 at 10:12 am #10622
Hi,
I am trying to get the “AND” logic to work but any search criteria i enter does not bring back a result unless i use the “OR” logic. What i am trying to achieve is when a user enters a set of criteria e.g. breakfast eggs sunday the results that are brought back are all the content on my website that has all those word in them and order the results in relevance for the ones with all three come up first and the ones with two matches come second etc.
Would you be able to assist.
Regards
ChrisOctober 27, 2016 at 10:20 am #10623Hi Chris,
With the default engine, the search logic works on a field basis – meaning that each keyword must match at least one of the selected fields. In case of “breakfast eggs sunday”, each word will have to match either the title, content or any of the selected fields. If the title matches “eggs” the content matches “breakfast” and “sunday”, it’s not considered as a match – because on database level this is not possible to distinguish.
To resolve this limitation and optional Index Table engine was implemented to index posts and post_type object contents. You will find all the information and explanations on these documentation chapters:
Best,
– Index table introduction
– Generating an index table
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 27, 2016 at 10:36 am #10624Thanks for your prompt response, i will give that a try later on this evening.
- AuthorPosts
You must be logged in to reply to this topic.