Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Making Intervals not Count
This topic contains 2 replies, has 2 voices, and was last updated by pyordanov1794 2 years, 11 months ago.
- AuthorPosts
- June 24, 2020 at 7:44 am #28061
Hi there,
we are looking to display our products when a certain keyword is being typed. However, we want to make sure that spaces and intervals are not an obstacle.
We have products that appear under ‘3step 42’. However, when someone tries to enter ‘3step42’ (without interval) nothing appears. How can we fix this?
You can try it on the website mentioned there.
Any help from you would be greatly appreciated. Thank you.
Kind regards.
June 24, 2020 at 8:29 am #28065Hi,
In short, there is no way to do that in an automated way.
The reason is, that to implement such logic, the plugin would have to split the input phrase each time there are no results. In this case, the plugin tries to search for
3step42
. When there are no results, it would have to start splitting and adding spaces, and doing more and more queries for:
3 step42
,3s tep42
,3st ep42
,3ste p42
,3step 42
, etc..
In this case, maybe the 6th query would be the one you are expecting, but that does not mean that the 2nd, 3rd, 4th does not yield any results either. This single search would then do 6 times more queries to the server, possibly causing very long timeouts. For longer words it would take even more.The only reasonable way is to add keywords manually to the post meta box.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 24, 2020 at 11:37 am #28070Thank you again for your time and assistance. This worked as expected.
Best regards.
- AuthorPosts
You must be logged in to reply to this topic.