Forum Replies Created
-
AuthorPosts
-
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.
Ernest Marcinko
KeymasterHi!
The problem is that the same search instance is on that page more than once – which is not supported by the plugin version that you are using.
I suggest you to update to the newest version (by downloading the package again from codecanyon).
The steps for safe updating you can find here, please read them carefully: http://wp-dreams.com/knowledge-base/updating-from-older-versions/
After upgrading the problem should disappear.
Ernest Marcinko
KeymasterHi!
Can you attach a copy of your current theme, so I can try to recreate the issue on my local server? It’s probably a smaller incompatibility problem.
September 18, 2014 at 7:39 am in reply to: The results take a seriously long time, over 15 seconds #2481Ernest Marcinko
KeymasterHi!
If you deselect custom fields, then the search speed is normal? (3-5 seconds)
What is the size of your databse? (I mean number of posts, products etc..)In case of bigger database (more than 10-20000 records) the search speed highly depends on the server speed and the configuration. There are a few things you can try first.
- Try to disable the relevance http://i.imgur.com/3CvQi6B.png
- Turn off the fulltext search: http://i.imgur.com/1BcUDJ5.png
- Lower the count of the results below 10: http://i.imgur.com/3sv1LLH.png
- If the content and the excerpt does not contain text, then disable the search in them: http://i.imgur.com/e9PdMRV.png
Ernest Marcinko
KeymasterNo problem at all.
Indeed it’s incorrect in the documentation! Thank you for pointing that out.Ernest Marcinko
KeymasterThe code is incorrect, it’s missing the [ ] tags.
echo do_shortcode('[wpdreams_ajaxsearchpro id=1]');Ernest Marcinko
KeymasterOkay, it’s uploaded fine now. I think the problem is that the entire code is echoed inside the span element. As far as I know only inline elements can be placed inside other inline elements in HTML, so that’s probably the problem. The search code contains divs, images, forms and those elements are invalid inside a span.
Try to change the span to a div and it should work properly then. You might as well need to change or add a few lines to your CSS to get the positioning right.
Ernest Marcinko
KeymasterHi!
Could you please upload the screenshot again? It seems like there is a bug in the support ticket open page.
Ernest Marcinko
KeymasterThis is definitely a theme conflict, since you changed the theme. Could you please attach the zipped theme file here, so I can try it on my test server. Hopefully I can reproduce the issue and find a quick fix for this issue.
Ernest Marcinko
KeymasterCan you provide temporary admin and ftp access to your site? (you can do it by editing the first post in this thread)
I can try to make some modifications on the search code based on your description. There is no configuration yet for your request, because it’s too specific. I can however try to change a few lines and perhaps that will help.Ernest Marcinko
KeymasterHi!
I believe you have fulltext search activated. The MySQL database fulltext search has some wierd disadvantages of which one is a so called “known words removing” – basically the database simply discard some words if it’s considered as a common word. I think “tube” might be considered as a common word and that’s causing the problem.
The solution is very simple. On the Fulltext settings page just disable the Fulltext search option: http://i.imgur.com/1BcUDJ5.png
Sorry for the late answer, I’ve been working on a knowledgebase for the plugins and I simply forgot to answer support tickets.
Let me know if it helps!
Ernest Marcinko
KeymasterIndeed! It happens with the new versions. There are several other bugs occuring with new browser versions, I’m working on them as well. Hopefully I can publish an update on this very soon. Thanks for reporting!
Ernest Marcinko
KeymasterHi!
I think you should try the “exact matches” option on the general options panel – that is good if you have many products.
When I get back to the office I will take a look at the source, to see if I can find a quick modification for your request.
-
AuthorPosts