ExifTool Forum

General => Other Discussion => Topic started by: StarGeek on May 08, 2022, 12:38:07 PM

Title: Google and Bing failure
Post by: StarGeek on May 08, 2022, 12:38:07 PM
I recently figured out that both Google and Bing are not doing a very good job of indexing these forums.  I was looking for an old post and couldn't find it with either of these.  While I hate to use it in the current situation, Yandex was able to find the post I was looking for as the first link shown.  I then copied that exact title of the post into both Google and Bing and still neither of them could find the post.

Just something to keep in mind when searching through the forums.
Title: Re: Google and Bing failure
Post by: Phil Harvey on May 15, 2022, 05:01:41 PM
Thanks.  I could probably re-enable the forum search because I don't think it was the problem.

As you can probably tell, the nice weather and the start of the bird migration here has been keeping me busy and away from ExifTool work recently.

- Phil
Title: Re: Google and Bing failure
Post by: Phil Harvey on July 18, 2022, 10:55:27 AM
I've re-enabled the search feature as long as the server load is low enough.  It was more work than I thought due to the server upgrade to MySQL 8.0 which seems to be incompatible with the SMF search feature.  I upgraded SMF but that still didn't fix it.  The fix was patch Search.php thusly:

> diff Search.php.original Search.php
1067c1067
< $subject_query_params['excluded_phrases_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($phrase, array('_' => '\\_', '%' => '\\%')) . '%' : '[[:<:]]' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $phrase), '\\\'') . '[[:>:]]';
---
> $subject_query_params['excluded_phrases_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($phrase, array('_' => '\\_', '%' => '\\%')) . '%' : '\\\\b' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $phrase), '\\\'') . '\\\\b';
1266c1266
< $subject_query['params']['body_not_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($subjectWord, array('_' => '\\_', '%' => '\\%')) . '%' : '[[:<:]]' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $subjectWord), '\\\'') . '[[:>:]]';
---
> $subject_query['params']['body_not_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($subjectWord, array('_' => '\\_', '%' => '\\%')) . '%' : '\\\\b' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $subjectWord), '\\\'') . '\\\\b';
1317c1317
< $subject_query['params']['exclude_phrase_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($phrase, array('_' => '\\_', '%' => '\\%')) . '%' : '[[:<:]]' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $phrase), '\\\'') . '[[:>:]]';
---
> $subject_query['params']['exclude_phrase_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($phrase, array('_' => '\\_', '%' => '\\%')) . '%' : '\\\\b' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $phrase), '\\\'') . '\\\\b';
1503c1503
< $main_query['parameters']['all_word_body_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($regularWord, array('_' => '\\_', '%' => '\\%')) . '%' : '[[:<:]]' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $regularWord), '\\\'') . '[[:>:]]';
---
> $main_query['parameters']['all_word_body_' . $count++] = empty($modSettings['search_match_words']) || $no_regexp ? '%' . strtr($regularWord, array('_' => '\\_', '%' => '\\%')) . '%' : '\\\\b' . addcslashes(preg_replace(array('/([\[\]$.+*?|{}()])/'), array('[$1]'), $regularWord), '\\\'') . '\\\\b';


- Phil