Dashes, dots and an interesting observation

With our Mini, I have been toying with some ways to search for substrings. What I'm finding is that dashes, dots, etc. don't allow for a substring match. However, there is one interesting observation that I have to note here.

The first special character is dropped.

That's right, be it a dash or a dot, the first one is dropped and ignored. Even when searching, the same behaviour occurs. What does this mean? How can I use it to my advantage?

Well, let's take a look at the UB181 example. If I were to make 2 variations of that in our "Additional Keywords" field (only shown to our Mini), simply making ub-181dz and ub181-dz (adding a dash where a letter meets a number, which is a simple regular expression) will not allow these to match a search for 181dz or ub181. Instead, I'd have to make ub-181-dz for a match of ub181 and u-b-181dz for a match of 181dz. That seems like an odd way to have to handle this, but again - simple regular expressions to make this happen.

I'm going to give this a shot and see how much more relevant I can make the searches. Most of the searches I notice are people searching for the ub181 example, so the ub-181-dz style would probably work well. I see similar searches for other types of tools, so probably something I can easily do globally to all of our SKU's for the optimal relevance. I may even feed that data to the big G and see how they like it. I can't see it hurting much of anything.


Popular posts from this blog

Yii multiple select dropdownlist with default values

Creating JPG images from PDF's using Perl and ImageMagick

Simpler pedal board