Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Can't get search to pull from woocommerce short description › Reply To: Can't get search to pull from woocommerce short description
I have looked at the description of the products, and I believe I know why the plugin is not able to return matches for those inputs.
The part number in the description is stored as a single word, but preceeded and followed by a star '*' character. I believe you are using the index table engine, which tries to recognize individual words, then stor them in the database. Unfortunatly the * character does not act as a word boundary, so the index stores it as-is. In your case, the indexed part number is not '67-0395′ but '*67-0395*' as found within the description. If you do a search query for *67-0395 or 67-0395* or *67-0395* it will find the part – as it matches the word ending, beginning and as a whole in each case.
The quickest resolution in my opinion is to use this custom filter function I made to remove the star '*' characters before indexing, then re-build the index.
1. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!
2. Then re-build the index: https://i.imgur.com/CXZbB9z.png
After that, it should start returning the parts by the alternative numbers.Best,
If you like my products, don't forget to rate them on codecanyon :)