Vintage Gruen
The forum for Gruen watch enthusiasts

Home » Member Forums » Improvements » Search not working consistently
Search not working consistently [message #2962] Wed, 12 February 2014 02:41 Go to next message
kastner is currently offline  kastner
Messages: 324
Registered: May 2013
Location: Pasadena CA
Gruen Guildsman
Maybe it is the forum, or maybe it is me but I'm having trouble with the search function. I just received a Guild 885 and using the Forum Search on '885' I didn't find anything. But when I turned to The Google with Gruen 885, it gave me this page: http://vintagegruen.org/vgforum/index.php?t=tree&th=83

Are others having problems like this?
Re: Search not working consistently [message #2963 is a reply to message #2962] Wed, 12 February 2014 04:12 Go to previous messageGo to next message
JackW is currently offline  JackW
Messages: 1670
Registered: May 2013
Location: Denver
Gruen Authority
General pain in the rear
Site Admin
interesting. typing just numbers into the search feature will consistently return no result. I tried 405, 420ss, 707 etc., but with the word searches no issue.

Gary?


All I know is based on hard work & writing by others. I can only aspire to augment this body of knowledge. If I am wrong it is because of my own failings. -me

"If I have seen farther it is by standing on the shoulders of giants." - Newton
Re: Search not working consistently [message #2964 is a reply to message #2962] Wed, 12 February 2014 04:20 Go to previous messageGo to next message
GaryM is currently online  GaryM
Messages: 1785
Registered: May 2013
Location: Seattle
Gruen Authority
Cheerleader

Good find! Numbers are not being indexed, only textual entries in the default software. There is a way but I have to modify a search array in the code.

I'll proof this out on our test forum and let you know how it goes.

Guess us old members here have that search indexing in our heads.

Thanks again for pointing this out!
Re: Search not working consistently [message #2972 is a reply to message #2964] Wed, 12 February 2014 21:44 Go to previous messageGo to next message
GaryM is currently online  GaryM
Messages: 1785
Registered: May 2013
Location: Seattle
Gruen Authority
Cheerleader

Implemented and tested good in the test forum. I Just made the changes here, looks good!

Have at it!
Re: Search not working consistently [message #2973 is a reply to message #2972] Thu, 13 February 2014 02:07 Go to previous messageGo to next message
JackW is currently offline  JackW
Messages: 1670
Registered: May 2013
Location: Denver
Gruen Authority
General pain in the rear
Site Admin
Thanks Gary!


All I know is based on hard work & writing by others. I can only aspire to augment this body of knowledge. If I am wrong it is because of my own failings. -me

"If I have seen farther it is by standing on the shoulders of giants." - Newton
Re: Search not working consistently [message #2975 is a reply to message #2973] Thu, 13 February 2014 02:27 Go to previous messageGo to next message
kastner is currently offline  kastner
Messages: 324
Registered: May 2013
Location: Pasadena CA
Gruen Guildsman
Excellent, thanks so much!
Re: Search not working consistently [message #2978 is a reply to message #2975] Thu, 13 February 2014 05:16 Go to previous messageGo to next message
Jenneke is currently offline  Jenneke
Messages: 1043
Registered: May 2013
Location: Netherlands
Gruen Authority
Wow! Great job gary. Smile

You can only waste time if you forget to enjoy it - Loesje
Re: Search not working consistently [message #13984 is a reply to message #2978] Sat, 28 November 2020 02:04 Go to previous messageGo to next message
kastner is currently offline  kastner
Messages: 324
Registered: May 2013
Location: Pasadena CA
Gruen Guildsman
Hate to bring up an old issue, but I just tried to do a movement (or year) search again and I'm getting no results. Is this working for others at this point?
Re: Search not working consistently [message #13985 is a reply to message #13984] Sat, 28 November 2020 02:45 Go to previous messageGo to next message
Case is currently offline  Case
Messages: 752
Registered: May 2019
Location: Cincinnati
Gruen Master
No, I’m also unable to search numbers.

My two caveats:
1) I'm wrong many times a day --just ask my wife!
2) Always seeking to learn more
Re: Search not working consistently [message #13987 is a reply to message #13985] Sat, 28 November 2020 02:53 Go to previous messageGo to next message
GaryM is currently online  GaryM
Messages: 1785
Registered: May 2013
Location: Seattle
Gruen Authority
Cheerleader

Yes software updates always revert back to search without numbers. I'll have to add that to the checklist when upgrading the forum. Try it now, you should be good to go now.
Re: Search not working consistently [message #13988 is a reply to message #13987] Sat, 28 November 2020 02:57 Go to previous messageGo to next message
Case is currently offline  Case
Messages: 752
Registered: May 2019
Location: Cincinnati
Gruen Master
Success! Thank you, Gary!!
Re: Search not working consistently [message #13989 is a reply to message #13988] Sat, 28 November 2020 02:59 Go to previous messageGo to next message
Case is currently offline  Case
Messages: 752
Registered: May 2019
Location: Cincinnati
Gruen Master
Oops, spoke too soon. It worked on 835. No results on 89.
Re: Search not working consistently [message #13991 is a reply to message #13989] Sat, 28 November 2020 03:12 Go to previous messageGo to next message
GaryM is currently online  GaryM
Messages: 1785
Registered: May 2013
Location: Seattle
Gruen Authority
Cheerleader

Case wrote on Sat, 28 November 2020 02:59
Oops, spoke too soon. It worked on 835. No results on 89.
That's an enhancement meaning its not coded to do so, too short meaning 3 or more, try 2019. I believe it's like that so we don't peg the database with thousands of hits.

These are the only 2 options, I can do a patch but that will take some effort.

if (@preg_match('/\p{L}/u', 'a') == 1) { // PCRE unicode support is turned on
// Match utf-8 words to index:
// - If you also want to index numbers, use regex "/[\p{N}\p{L}][\p{L}\p{N}\p{Mn}\p{Pd}'\x{2019}]*/u".
// - Remove the \p{N} if you don't want to index words with numbers in them.

preg_match_all("/\p{L}[\p{L}\p{N}\p{Mn}\p{Pd}'\x{2019}]*/u", $text, $t1);
foreach ($t1[0] as $v) {
if ($lang != 'zh-hans' && $lang != 'zh-hant' && $lang != 'ja' && $lang != 'ko') { // Not Chinese, Japanese nor Korean.
if (isset($v[51]) || !isset($v[2])) continue; // Word too short or long.
}
$a[] = _esc($v);
}
return $a;

[Updated on: Sat, 28 November 2020 03:55]

Report message to a moderator

Re: Search not working consistently [message #13992 is a reply to message #13991] Sat, 28 November 2020 16:16 Go to previous messageGo to next message
kastner is currently offline  kastner
Messages: 324
Registered: May 2013
Location: Pasadena CA
Gruen Guildsman
Thanks for the quick fix!
Re: Search not working consistently [message #13994 is a reply to message #13992] Sat, 28 November 2020 17:14 Go to previous messageGo to next message
Case is currently offline  Case
Messages: 752
Registered: May 2019
Location: Cincinnati
Gruen Master
Thank you, Gary! Good to know the limits. Even having 3 digit number search is most helpful, and that appears to get correct results each time. I’m code illiterate, so do I paste the code in the search bar to experiment for shorter numbers?

My two caveats:
1) I'm wrong many times a day --just ask my wife!
2) Always seeking to learn more
Re: Search not working consistently [message #13995 is a reply to message #13994] Sat, 28 November 2020 17:35 Go to previous messageGo to next message
GaryM is currently online  GaryM
Messages: 1785
Registered: May 2013
Location: Seattle
Gruen Authority
Cheerleader

No that's just the code that I modified to get the 3+ numbers search working.
Re: Search not working consistently [message #13996 is a reply to message #13995] Sat, 28 November 2020 17:54 Go to previous message
thesnark17 is currently offline  thesnark17
Messages: 461
Registered: January 2017
Gruen Guildsman
Thanks very much! I appreciate it.
Previous Topic: Should we have Mentors here at the forum?
Goto Forum:
  


Current Time: Sat Apr 17 04:49:46 UTC 2021

Total time taken to generate the page: 0.01025 seconds