[RESOLVED]Leading Zeros for search algorithm

Started by Wajo357, May 04, 2014, 08:21:19 PM

previous topic - next topic
Go Down

Wajo357

May 04, 2014, 08:21:19 PM Last Edit: May 05, 2014, 08:59:27 AM by shmax
I could have sworn this was already implemented, but apparently not. It would be nice for the search algorithm to account for leading zeros when there is a 0 in front of a number as part of the search or product name. Therefore searches with TW-2 should get a result for TW-02 (and visa versa).
<a href="http://www.shmax.com/img/sigs/signature.swf?user_id=853" target="_blank" class="new_win">http://www.shmax.com/img/sigs/signature.swf?user_id=853</a>

shmax


I could have sworn this was already implemented, but apparently not. It would be nice for the search algorithm to account for leading zeros when there is a 0 in front of a number as part of the search or product name. Therefore searches with TW-2 should get a result for TW-02 (and visa versa).


Looks like we had it working the other way (searching for something with a leading zero would match something without it). I've made the change, and it seems to do what you want, now.

Wajo357

<a href="http://www.shmax.com/img/sigs/signature.swf?user_id=853" target="_blank" class="new_win">http://www.shmax.com/img/sigs/signature.swf?user_id=853</a>

Wajo357

still doesn't work for km-3/km-03
<a href="http://www.shmax.com/img/sigs/signature.swf?user_id=853" target="_blank" class="new_win">http://www.shmax.com/img/sigs/signature.swf?user_id=853</a>

shmax


still doesn't work for km-3/km-03


Sure, it does!

shmax



still doesn't work for km-3/km-03


Sure, it does!


OKay, okay, so I discovered another bug, namely that the admin button I have for queuing the rebuilding of the search index wasn't working. So I fixed that, and the index is rebuilding as I write this.

Wajo357

works! Thanks!
<a href="http://www.shmax.com/img/sigs/signature.swf?user_id=853" target="_blank" class="new_win">http://www.shmax.com/img/sigs/signature.swf?user_id=853</a>

Go Up