Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Blank speces in search and copy and paste search terms
- This topic has 16 replies, 2 voices, and was last updated 8 years, 9 months ago by
Ernest Marcinko.
-
AuthorPosts
-
August 7, 2017 at 8:02 am #14152
leelnj
ParticipantHello,
hello. my client has bought your plugin and we have configured it but we have one issue. we have product numbers such as 100-6-58-800. if a client types in 100658800 it will show no results. is there any way of showing the result or keyword suggestion if the client does not enter special characters. When searching by Title or Order Reference the search function should return results if a user replaces characters such as hyphens in their search with spaces. eg if someone searches for
the Title = 105 mm Black & Blue Ribbon, Order Ref = Globalmark ribbon – Blk-Blue ribbon /400mm long panels by typing in Black Blue Ribbon or Blk Blue ribbon the above result should display
2.) My ajax dropdown search is really slow and it also does not work if I copy and paste text in there
3.) We wanted to extend our serach capability and put some attruibutes into product tags so search can read them eg article number and order reference but search is not reading order ref try typing in Globalmark ribbon – Blk-Blue ribbon /400mm long panels which should be 105 mm Black & Blue RibbonAugust 7, 2017 at 12:39 pm #14156Ernest Marcinko
KeymasterHi,
1. The index table engine might be a solution for you. The recent plugin version does support detecting and indexing words with special characters. It may not work, but it’s definitely worth a try.
2. The search performance in most cases is equivalent with the server performance. There are however tricks to make it more efficient: https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/performance_tuning.html
3. Make sure that the search in terms option is enabled. If you already have performance issue, I recommend solution #2 from this documentation (with index table engine): https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/general_settings/search_in_terms_categories,_tags.html
August 8, 2017 at 4:29 pm #14175leelnj
ParticipantYou cannot access this content.
August 9, 2017 at 11:06 am #14181Ernest Marcinko
KeymasterHi!
Are you sure? I just tried the search, and I’m seeing prices on variable products as well: http://i.imgur.com/wqIpKY3.jpg
I believe that product is variable, or at least I’m guessing from the product page.
Is it happening on a specific search phrase, or with specific products?August 9, 2017 at 1:06 pm #14187leelnj
ParticipantYou cannot access this content.
August 9, 2017 at 1:42 pm #14190Ernest Marcinko
KeymasterHi,
Indeed, that does look like a bug to me. I’ve looked up the source, and it seems like that the taxonomy term suggestions does not respect the maximum suggestions count. As a temporary solution, I have disabled term suggestions for now: http://i.imgur.com/tIPe4Fl.png
I will make sure to fix this is in the upcoming release.
August 30, 2017 at 2:50 pm #14560leelnj
Participanthello. my client has bought your plugin and we have configured it but we have one issue. we have order references such as B30-25-595. if a client types in B30-25-595 it will display results but if they type in B3025595 it will show no results. It will work if i type in B30 25 595 which is great and needed as well but not when there is no space eg B3025595 . I have tried to use the following code from your knowledgebase to remove hypens but it doesnt work
// —- !!! ONLY COPY PASTE CODE BELOW THIS LINE to the functions.php in your theme directory !!! —-
add_filter(‘asp_search_phrase_before_cleaning’, ‘asp_replace_characters’, 10, 1);
add_filter(‘asp_query_args’, ‘asp_replace_characters’, 10, 1);
function asp_replace_characters( $s ) {
$characters = “‘,._-/?!”; // Type characters one after another
$replace_with = ”; // Replace them with this (space by default)
if ( is_array($s) ) {
if ( isset($s[‘s’]) && !$s[‘_ajax_search’] )
$s[‘s’] = str_replace(str_split($characters), $replace_with, $s[‘s’]);
} else {
$s = str_replace(str_split($characters), $replace_with, $s);
}
return $s;
}This is critical for my client so appreciate your response asap
2.) I really need my keyword suggestion to be using taxonomy term suggestions. has this been fixed?
” I’ve looked up the source, and it seems like that the taxonomy term suggestions does not respect the maximum suggestions count. As a temporary solution, I have disabled term suggestions for now:”August 30, 2017 at 2:57 pm #14561Ernest Marcinko
KeymasterHi,
1. Are you using the index table engine, as I suggested before? That code will not help in this case, because you don’t want to remove hyphens from the search phrase, but compare a search phrase without hyphens to content with hyphens, which is much more difficult to solve.
2. Yes, this should have been solved in the recent release (version 4.11.4)
August 30, 2017 at 6:17 pm #14565leelnj
Participantyes i am using index table engine. I really need some sort of solution please
August 31, 2017 at 9:12 am #14568Ernest Marcinko
KeymasterHi,
The problem is that you are not using the latest version of the plugin. I see 4.10.5 installed, which is very outdated, as the latest is 4.11.4
Please install the latest release, re-create the index table, and it should probably do the trick, as the hyphen and special character replacement words were introduced in one of the latest releases.August 31, 2017 at 12:45 pm #14570leelnj
ParticipantI have just installed the latest version
If i enter B30-25-595-BLNKWT i get results
If i enter B30 25 595 BLNKWT I get results
If i enter B3025595BLNKWT i get no resultsThere must be a way of getting this to work
September 1, 2017 at 9:01 am #14572Ernest Marcinko
KeymasterHi!
Have you re-created the index table as well? http://i.imgur.com/StoQSrP.png
This step is very important.September 1, 2017 at 9:05 am #14573leelnj
Participantyes. its working now. i have had to run a query to put all of my order refs in my product tags stripped out of any dashes. Not ideal but works
September 1, 2017 at 9:09 am #14574leelnj
ParticipantI Have 1 more issue. if i copy and paste anyhing into search box search does not always launch. have you any idea how to get it to launch all the time
September 1, 2017 at 9:15 am #14575Ernest Marcinko
KeymasterDoes it not work on specific phrases or a specific browser?
I have tried many phrases with CTRL + C and CTRL + V, but it all worked for me. Or do you want to trigger it when right-click + paste is clicked? -
AuthorPosts
- You must be logged in to reply to this topic.