Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ahax Pro search
This topic contains 17 replies, has 2 voices, and was last updated by Ernest Marcinko 5 years, 1 month ago.
- AuthorPosts
- July 1, 2019 at 8:18 pm #23549
Hi, I would like to know if I can get the following search criteria to work using the Index Table Engine. (I currently have 20,000 products on my site) At the moment I am only having partial success.
For example I am searching for a product named Madden NFL 19 – PlayStation 4 (This is exactly how it appears on my site.)
(In Ajax Playstation 4 is set as a keyword. PS4 is set as a synonym.)
The below various search criteria does not work. These will be the most popular searches by my customers. Is there a way to get them to work? These searches work on sites such as Amazon.com, Bestbuy.com, and Gamestop.com. I need the searches to be fast.
Playstation 4 Madden 19
Madden 19 Playstation 4
PS4 Madden 19
Madden 19 PS4These searches work:
Madden nfl 19 – playstation 4 (finds specific version)
Madden nfl 19 (finds all versions)
Madden 19 (finds all versions)Thank you.
July 2, 2019 at 9:37 am #23557Hi,
Thank you very much for the details, I was able to find the issue and probably fix it as well.
So due to the relatively large number of keywords, the plugin tries to assume the “pool size”, which is used when matching overlapping sets of results. When the pool size is too small, then potentially some of the results might be missed from the final list.
I have adjusted the pool sizes manually according to the keywords count, it should give you much better results now: https://i.imgur.com/o90UAgT.pngI hope this helps!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 2, 2019 at 4:35 pm #23570Hi,
It’s working better but there’s still no results for the below searches. These would be the most common searches. I have PS4 set as a synonym for Playstation 4 so I am not sure why it’s not working.
PS4 Madden 19
Madden 19 PS4July 3, 2019 at 1:14 pm #23581Hi,
I see what the problem is then. Synonyms cannot be set for mutliple word keywords only single words. So “Playstation 4” will have no effect whatsoever, since it is composed from two separate words. I wonder why it allowed you entering multiple keywords into the synonyms input (I guess with copy/paste?), I will check that for a later release.
The most optimal solution would be for this to use the additional keywords inputs, however I guess you have a lot of records, so that could be problematic. Another possibility, is to use the custom code from this knowledge base.
You could use these keywords in the $replace variable like:
Best,$replace = array( 'ps4' => 'playstation 4', 'ps2' => 'playstation 2', 'ps1, psone, ps' => 'playstation 1' );
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 3, 2019 at 6:41 pm #23594I have playstation 4 set as a key word. Not set as a synonym. Can the key word be multiple words? All the keywords I am using are in the title of each product. For example, “Madden NFL 19 – PlayStation 4”. I have ps4, one word, set as the synonym for key word playstation 4. When i search playstation 4 madden 19 it works perfectly. However, when I search ps4 madden 19 it does not work.
Can I globally import additional keywords? How do I get to the meta box on post editor screen?
If it comes to custom code are you able to do that for me? I am not a developer and don’t fee comfortable doing custom coding.
Thank you.
July 4, 2019 at 10:20 am #23600Hi,
Unfortunately synonyms are one single word phrases, both the keyword and the synonym must be a single word (there are many reasons for that, I would rather not go into details why).
The only way is to use that custom code. If you want, I can help you implementing that, if you have a list of the needed keywords. Just add temporary FTP details, so I can make the changes within the child theme functions file.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 4, 2019 at 10:09 pm #23604Will you do all 3 search themes the same please? Thank you very much.
‘ps4’ => ‘playstation 4’,
‘ps3’ => ‘playstation 3’,
‘ps2’ => ‘playstation 2’,
‘ps1, psone, ps one, ps, psx’ => ‘playstation 1’
‘snes’ => ‘super nintendo’,
‘n64’ => ‘nintendo 64’,
‘wiiu’ => ‘nintendo wii u’,
‘gc’ => ‘nintendo gamecube’,
‘gameboy, gb’ => ‘game boy’,
‘gameboy, gb, gbc’ => ‘game boy color’,
‘gameboy, gba’ => ‘game boy advance’,
‘xb1,’ => ‘xbox one’,July 5, 2019 at 10:42 am #23609Hi,
Can you please add temporary FTP details? Otherwise I cannot change the files.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 5, 2019 at 10:53 pm #23619You cannot access this content.July 6, 2019 at 4:04 pm #23620Thank you!
I have managed to make the change, please check it.
For future reference, this is the code I added:
Best,// AJAX SEARCH PRO add_filter( 'asp_query_args', 'asp_replace_search_keywords', 10, 2 ); function asp_replace_search_keywords( $args, $id ) { /** * Add as many words as you want. On the left side place the * word or words separated by comma to replace. * To the right side, place the single word to replace it with. */ $replace = array( "ps4" => "playstation 4", "ps3" => "playstation 3", "ps2" => "playstation 2", "ps1, psone, ps one, ps, psx" => "playstation 1", "snes" => "super nintendo", "n64" => "nintendo 64", "wiiu" => "nintendo wii u", "gc" => "nintendo gamecube", "gameboy, gb" => "game boy", "gameboy, gb, gbc" => "game boy color", "gameboy, gba" => "game boy advance", "xb1," => "xbox one" ); // ---------------------------------------- // Do not change anything below this line // ---------------------------------------- foreach ( $replace as $k => $w ) { $kr = explode(',', $k); foreach ($kr as $krk => &$krv) { $krv = trim($krv); if ( $krv == '' ) { unset($kr[$krk]); } else { $krv = '/\b' . $krv . '\b/u'; } } if ( count($krv) > 0 ) { $args['s'] = preg_replace($kr, $w, strtolower($args['s'])); } } return $args; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 6, 2019 at 8:37 pm #23622This is working perfectly. Thank you.
I have UPC’s assigned to each product using custom attributes. When I search for UPC 014633736977 the drop down results is showing 014633736977. When I click on drop down result it takes me to the 2 products that are assigned to this UPC.(Used and new version of product) Is there a way to make it show the product title for drop down result instead of UPC? This example UPC is for Madden NFL 19 – PlayStation 4.
Is there a way to speed up search results?
July 7, 2019 at 8:48 am #23624Hi,
Sure, that is possible as well. So, instad of selecting these taxonomy terms to be returned as results, you should instead select them in the index table options panel:
– Step 1, deselect them under the search settings: https://i.imgur.com/vBs9sa2.png
– Step 2, select them under the index table options: https://i.imgur.com/9Ry4PHN.pngFor better performance, I recommend checking these tips from the documentation.
Best,
Ultimately the search performance corresponds with the server response time, as well as the number and quality of the plugins installed etc.. Those tips may give you the best possible response time with your configuration.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 8, 2019 at 7:01 am #23628I must have did something wrong. I thought I followed your steps but now the search is not working at all. There must be something I didn’t do.
July 8, 2019 at 7:43 am #23632Hi,
The index table is not fully generated. Make sure to click on the ‘Create new index’ button and wait until it finishes: https://i.imgur.com/FPK4aqJ.png
Best,
That will solve the problem.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 8, 2019 at 7:39 pm #23636Hi, I did a fully generated index table and it is still not working.
- AuthorPosts
You must be logged in to reply to this topic.