Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterHi!
I took a look at the default thumbnails plugin source code and modified the search code a bit, now you should be able to see the images.
Ernest Marcinko
KeymasterHi!
No problem at all!
I took an extra hour to look at your sites code, but I can’t understand some things. For example, the post “West Point Bridge Designer” has an image on the post page: http://i.imgur.com/4EUogaf.png
But, when I look at the post editor, I can’s see this image set anywhere, so the search can’t see it either: http://i.imgur.com/zr9TNjE.png
The search can’t see this image, because it’s not a featured image nor is it in the content. Where are those images coming from? Are they set in a custom field? I have tried to look throuhg the template code, but I can’t find where those images are coming from.
Ernest Marcinko
KeymasterHi!
Thank you, I understand now. I just installed the newest version (3.1) and it seems that it solved the problem. Let me know if it’s not working.
Ernest Marcinko
KeymasterHi!
Thank you for uploading it to dropbox, something is wrong with the uploader here – I will look into that. I’ve installed the theme with all the plugins but the search still works for me.
However I just released the 3.1 version of the plugin 2 days ago. It has a few changes here and there, please download it from codecanyon, delete the old one, and install the new one. There is a chance that it will help.
You can also try to experiment with the javascript source on the compatibility options panel: http://i.imgur.com/QlYBeuf.png

Sometimes it solves client side issues.If you still experience the problem after upgrade and changing the javascript sources, then I will probably have to take a look at the problem and try to fix it locally on your server.
Ernest Marcinko
KeymasterHi!
Please try the strip/run shortcodes option on the Advanced options panel, here is a small description about them in the documentation: http://wp-dreams.com/demo/wp-ajax-search-pro3/docs/#advanced_options_running_and_stripping_shortcodes
Ernest Marcinko
KeymasterOh sorry, I forgot something – it uses a new function which the old version does not support. I proceeded to log in to your site with the details and used the plugin editor to add those few lines to the plugins function.php file. It should work now correctly.
Ernest Marcinko
KeymasterHi!
I’ve tried the theme with every possible variation I could, but it works for me. Someone however had a similar issue with another theme, I wonder if the same solution would help you as well.
All you need to do is open up the cache options page and hit the save button (don’t change anything, just save): http://i.imgur.com/FzTTVNx.png
Let me know how it goes!
Ernest Marcinko
KeymasterHi!
I don’t seem to understand the problem. I just logged in your site and everything looks normal to me. I can see the post categories and I can select them as well.
Ernest Marcinko
KeymasterHi!
I have changed up a few things in the code to avoid incompatibility. It should show the results now. Thank you for the proper details!
Ernest Marcinko
KeymasterHi!
It’s a known but, the update is uploaded to codecanyon waiting for approval.
I’m attaching 2 zipped php files to this post. Please excract them and upload them via ftp to your server to the wp-content/plugins/ajax-search-pro/includes directory to overwrite the 2 original files there.
Refresh your browser, and the problem should disappear.-
This reply was modified 11 years, 10 months ago by
Ernest Marcinko.
September 19, 2014 at 7:54 am in reply to: The results take a seriously long time, over 15 seconds #2503Ernest Marcinko
KeymasterThe problem with custom fields is, that wordpress stores them in a separate table, and if you have for example 10 custom fields for every post, then the initial search base becomes 10×25000 = 250 000. The more custom fields you have, the bigger it grows.
There is definitely something wrong with the configuration, as the “what does the fox say” should come up as first, even for exact matches. Did you turn off fulltext search? The MyIsam database engine has a so called “stop words” definition file, which excludes words below length 4 and some very common words like “what”, “do”, “does” and a couple thousand more.. So no matter what you type, the database just ignores it in fulltext mode. Here is how you can turn it off: http://wp-dreams.com/knowledge-base/no-results-for-some-keywords/
Also, when trying new configurations make sure, that the search cache is disabled. (it’s disabled by default)
Can you provide temporary admin and ftp details so I can check your configuration and do a debugging on the search code if neccessary? You can do this safely by editing your first post in this thread.
Ernest Marcinko
KeymasterNo problem at all! I take customer support very seriously.
I will remove them, but no worries, nobody had access to them – attachements in support threads are only accessible to me and the thread owner.
Have a nice day, and thank you for the fantastic review!
Ernest Marcinko
KeymasterHi!
Thank you for the login details, I just did a quick check and the ajax request indicated an inconsistency with the caching options. The fix was rather simple, all I did was saved the caching options on the Ajax Search Pro – so the default values had been restored.
I don’t know what could have caused this, but I see no chance that it will ever happen again, at least I hope so 🙂
Let me know if this happens again, then I will investigate more, but for now I think it’s not necessary.
Ernest Marcinko
KeymasterHi!
I have tried the search with the theme, but unfortunately it’s working for me, no matter where I place the search shortcode. I guess there is something else besides the theme, but I don’t know if it’s another plugin, or a different server configuration.
Can you grant me temporary administrator and ftp access for the website? In these cases I usually try to run a line-to-line debugging on the search code until I find the cause.
You can add the credentials by editing your first post in this thread.Ernest Marcinko
KeymasterHi!
I could not enter with the credentials, perhaps my IP is restricted after all.
But I think I might found a quick solution for your request.
0. Turn off fulltext search if you are using it: http://i.imgur.com/1BcUDJ5.png
1. Open up the plugins/ajax-search-pro/includes/search_content.class.php file and go to line 52, where you should see this:
/*----------------------- Title query ---------------------------*/ if ($options['set_intitle']) { $words = $options['set_exactonly']==1?$s:$_si; $parts[] = "(lower($wpdb->posts.post_title) REGEXP '$words')"; $relevance_parts[] = "(case when (lower($wpdb->posts.post_title) REGEXP '$words') then $searchData[titleweight] else 0 end)"; $relevance_parts[] = "(case when (lower($wpdb->posts.post_title) REGEXP '$s') then $searchData[etitleweight] else 0 end)"; } /*---------------------------------------------------------------*/2. Replace that code with this:
/*----------------------- Title query ---------------------------*/ if ($options['set_intitle']) { $words = $options['set_exactonly']==1?$s:$_si; $parts[] = "(lower($wpdb->posts.post_title) REGEXP '$words')"; $relevance_parts[] = "(case when (lower($wpdb->posts.post_title) REGEXP '$words') then $searchData[titleweight] else 0 end)"; /*$relevance_parts[] = "(case when (lower($wpdb->posts.post_title) REGEXP '$s') then $searchData[etitleweight] else 0 end)"; */ // The first word relevance is higher if (count($_s)>1) $relevance_parts[] = "(case when (lower($wpdb->posts.post_title) REGEXP '".$_s[0]."') then $searchData[etitleweight] else 0 end)"; } /*---------------------------------------------------------------*/This modification will give the first search word higher priority, thus the order of the results will change.
-
This reply was modified 11 years, 10 months ago by
-
AuthorPosts