algenlj
Forum Replies Created
-
Ajay, it is custom theme that was made for me by order.
Hi Ajay,
I deleted the plugin, re-installed the version 2.5.3 and now it seems to work as it is supposed to be.
Thanks a lot for your help and time spent trying to resolve the issue! I will mark this topic as resolved, but if you would locate and correct the error in the later updates, I would appreciate a note from you to update the plugin.
I don’t think it is good idea since everything has been working properly for over a year until recent update. Could you please provide me with the older versions of plugin?
Hi Ajay, I changed the code but it does not seem to affect search results. Here are the queries I get now:
SELECT DISTINCT (MATCH(wp_posts.post_title) AGAINST ('паэлья' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('паэлья' ) * 1 ) as score FROM wp_posts WHERE 1=1 AND ( wp_posts.post_date <= '2021-11-15 10:12:29' ) AND ((MATCH(wp_posts.post_title) AGAINST ('паэлья' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('паэлья' ) * 1 ) OR ( ((wp_posts.post_excerpt LIKE '%паэлья%')) ) ) AND (wp_posts.post_password = '') AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'inherit')) ORDER BY score DESC LIMIT 0,1SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*,wp_posts.ID as ID, (MATCH(wp_posts.post_title) AGAINST (‘паэлья’ ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST (‘паэлья’ ) * 1 ) as score
FROM wp_posts
WHERE 1=1
AND ( wp_posts.post_date <= ‘2021-11-15 10:12:29’ )
AND ((MATCH(wp_posts.post_title) AGAINST (‘паэлья’ ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST (‘паэлья’ ) * 1 )
OR ( ((wp_posts.post_excerpt LIKE ‘%паэлья%’)) ) )
AND (wp_posts.post_password = ”)
AND wp_posts.post_type = ‘post’
AND ((wp_posts.post_status = ‘publish’
OR wp_posts.post_status = ‘inherit’))
ORDER BY wp_posts.post_date DESC
LIMIT 0, 10Well, it depends. 🙂 In general I think I can change code, but only if properly instructed.
As I wrote before, I disabled Fulltext because in this case it shows ALL posts regardless of whether they have searched text or not.
It seems this upgrade fixed it, but even after I enabled this setting, search gives the same results.
Now there are 2 queries with “MATCH” as follows:
SELECT DISTINCT (MATCH(wp_posts.post_title) AGAINST ('паэлья' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('паэлья' ) * 1 ) as score FROM wp_posts WHERE 1=1 AND ( wp_posts.post_date <= '2021-11-14 19:07:11' ) AND ((MATCH(wp_posts.post_title) AGAINST ('паэлья' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('паэлья' ) * 1 ) OR ( ((wp_posts.post_excerpt LIKE '%паэлья%')) ) ) AND (wp_posts.post_password = '') AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'inherit')) ORDER BY score DESC LIMIT 0,1SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*,wp_posts.ID as ID, (MATCH(wp_posts.post_title) AGAINST (‘паэлья’ ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST (‘паэлья’ ) * 1 ) as score
FROM wp_posts
WHERE 1=1
AND ( wp_posts.post_date <= ‘2021-11-14 19:07:11’ )
AND ((MATCH(wp_posts.post_title) AGAINST (‘паэлья’ ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST (‘паэлья’ ) * 1 )
OR ( ((wp_posts.post_excerpt LIKE ‘%паэлья%’)) ) )
AND (wp_posts.post_password = ”)
AND wp_posts.post_type = ‘post’
AND ((wp_posts.post_status = ‘publish’
OR wp_posts.post_status = ‘inherit’))
ORDER BY wp_posts.post_date DESC
LIMIT 0, 10Possibly this one:
`SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*,wp_posts.ID as ID
FROM wp_posts
WHERE 1=1
AND ( wp_posts.post_date <= ‘2021-11-14 14:54:48’ )
AND (((wp_posts.post_title LIKE ‘%паэлья%’)
OR (wp_posts.post_content LIKE ‘%паэлья%’))
OR ( ((wp_posts.post_excerpt LIKE ‘%паэлья%’)) ) )
AND (wp_posts.post_password = ”)
AND wp_posts.post_type = ‘post’
AND ((wp_posts.post_status = ‘publish’
OR wp_posts.post_status = ‘inherit’))
ORDER BY wp_posts.post_date DESC
LIMIT 0, 10Absolutely yes.
Sorry Ajay, there are several queries with “Select wp_posts”, but none of them is called by component better-search. There is only one query from better-search – the one I sent to you above.
get_option()
wp-includes/option.php:125
bsearch_upgrade_settings()
wp-content/plugins/better-search/includes/admin/register-settings.php:333
bsearch_settings_defaults()
wp-content/plugins/better-search/includes/admin/register-settings.php:277
bsearch_get_default_option()
wp-content/plugins/better-search/includes/admin/register-settings.php:304
bsearch_get_option()
wp-content/plugins/better-search/includes/admin/register-settings.php:41
bsearch_load_plugin()
wp-content/plugins/better-search/includes/class-better-search.php:1080
do_action_ref_array(‘parse_query’)
wp-includes/plugin.php:551
WP_Query->parse_query()
wp-includes/class-wp-query.php:1080
WP_Query->get_posts()
wp-includes/class-wp-query.php:1766
WP_Query->query()
wp-includes/class-wp-query.php:3448
WP->query_posts()
wp-includes/class-wp.php:624
WP->main()
wp-includes/class-wp.php:747
wp()
wp-includes/functions.php:1291Or this one?
`SELECT option_value
FROM wp_options
WHERE option_name = ‘ald_bsearch_settings’
LIMIT 1Here it is:
WP_Query->get_posts()
wp-includes/class-wp-query.php:1766Hi Ajay,
I updated plugin but nothing has changed unfortunately.
Cache has already been disabled in my settings.
I also installed Query Monitor, but I never used it and I do not understand where to look for this query, can you please clarify?
Ajay, when I turn seamless mode off, the results are shown by relevance, but the outlay itself ruins all the design of my web-site and it can not be used this way.
For your information, when mySQL FULLTEXT searching is enabled, the search result shows ALL posts on the web-site, regardless that include search terms or not.
Do you think anything can be done with it, or maybe you can provide me with a previous version of plugin?
Ajay, thanks for your reply.
All this time I had seamless mode enabled.
Also I have default settings of title vs. content, but still it shows newer posts on top regardless of whether there is required word in the title or not.
I also turned on mySQL FULLTEXT searching, but it still sorts the results by date.
As I wrote before, it all started after an update about 3 weeks ago. Do you have any idea how to fix it? Or maybe you can provide me with an older version, so that I could restore it and leave it if it works.