Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Minimal Character and Default Result
- This topic has 23 replies, 2 voices, and was last updated 7 years, 11 months ago by
Ernest Marcinko.
-
AuthorPosts
-
May 15, 2018 at 11:08 am #17868
div
ParticipantHi Earnet,
I tried that previously but didn’t retrieve either of the Agents as that seems to work with exact matches. What I’m looking for is not an exact match but for the search to start from the beginning of the keyword.
Thanks
Femi
May 16, 2018 at 1:47 pm #17879Ernest Marcinko
KeymasterHi Femi,
I don’t know if there is a better solution for that. I was thinking using the index table engine + OR logic, but it would yield the same results, as the reverse terms are also matched. Maybe a direct code modification, but I am not sure about that either.
May 23, 2018 at 3:49 pm #17989div
ParticipantHi Ernest,
Do you think there’s a solution in view? We are planning to go live next week and I’m getting a bit worried.Just in case I didn’t explain the issue well the other time, see attached image for a pictorial illustration. This assumes you have two records (partial post codes) in your database.
Thanks
FemiMay 24, 2018 at 11:58 am #18003Ernest Marcinko
KeymasterHi Femi,
The ‘OR with exact word matches’ would return the expected results, however the partial matching of the word beginnings would not work.
I have made a direct modification to the index table search file, so that only either word of the prhase matching any of the word beginnings (or whole words) is returned.
I this case:
– Phrase “AB10 3TU” will match anything starting with “AB10” or “3TU”
– Phrase “B10 3TU” will match anything starting with “B10” or “3TU” – but will NOT match “AB10”This is as close as it can get. I have also enabled the index table engine for both instances, as this only works with that. Make sure that all the desired fields are selected under the index table submenu.
May 24, 2018 at 12:39 pm #18006div
ParticipantHi Ernest,
I’ve done a quick test and it looks like this has worked!
Many thanks for your prompt and outstanding supportRegards
FemiMay 24, 2018 at 12:57 pm #18007Ernest Marcinko
KeymasterYou cannot access this content.
June 21, 2018 at 2:28 pm #18383div
ParticipantHi Earnest
The site has now gone live, but another issue has just come to light.Consider 3 agents with the following post codes:
Linda – RH1 , RH2 , RH6, KT17, KT18, KT19, KT20
Michelle – RH12, RH13, RH14
Ash – UB1,UB2,UB3,UB4,UB5,UB6,W7,W13Using the tool, if you search using keyword “RH1 4BU” you get the three agents retrieved. What we want is just for Linda only to be retrieved. Of course, we can see why Michelle is returned.
In the Agent admin section, if we record 3-character post codes with a space at the end before the comma, to make it look like 4 characters (e.g. “RH1 “), can we make the tool ensure it looks at the first 4 characters to retrieve the result?
I was initially surprised Ash was retrieved but later saw that the “4BU” is also returning “UB4”. Can this be adjusted such that only the first 4 characters of a keyword (e.g. “RH1 “) are taken into consideration during a search.
Many thanks for your help
Femi
June 21, 2018 at 2:30 pm #18384div
ParticipantYou cannot access this content.
June 23, 2018 at 8:59 am #18406Ernest Marcinko
KeymasterHi!
In this case, I really strongly believe that the ‘or with exact matches‘ logic is the one you should be using, as it almost perfectly fits your needs.
It will definitely return only the first agent, as expected, as the post code must be matched exactly, not partially. -
AuthorPosts
- The topic ‘Minimal Character and Default Result’ is closed to new replies.