Sunday, November 22, 2015

Would an "around" search token make any sense?


Have u seen Mac OS X's search tokens?




The Finder includes tokens—a smart way to filter your searches. When you select a suggestion, a token is created. Instantly your search is filtered, and you see only the files that meet those criteria. You can change the scope of the token by clicking the arrow. If you want to narrow your search even more, you can use multiple tokens together. Search Tokens Search for specific file types: For example, if you wanted to find all the JPEG (.jpg) images on your Mac, type .jpg in the search field, and you'll immediately see results pop into the window. Click This Mac in the header to find all JPEGs on your entire hard disk. Not only will Spotlight display thumbnails, small images, of your JPEG images, it'll also list other things that match your criteria, such as documents that contain the word ”.jpg” in them. You can then access the file right from that Finder window.





I was wondering whether having a search-token "Around" that would filter numeric based searches to a +/-10% (or any other %) would make sense to include in a search field.


The problem that I have is that the fields that I want to search might be very precise, let's say $55402.12, $35014.16, $50957.78, and instead of using a range search token (that I'd assume would be complex to implement) that searches between $50000 and $56000 I'd like to search values around $53000 with a +/-10% tolerance.


So, in a nutshell the question is if having an "Around" Search Token would be useful of having usual ">" "<" ">=" "<=" ranges.



Answer



I think this is an excellent idea. People tend to think in those terms, "It was about $50k" so this would match well. I'd be inclined to sort the results by proximity to the search value, and make the range quite generous, but there is some logic which might apply.


This isn't going to be easier to implement than a range though. Either you're going to convert into a range in some way, or you're going to have to check the difference between the search value and actual values, and sort on that difference.



To convert a number into a range, you could use the precision of the number they give to determine the range.


So if someone says around 50000, you assume they're specifying the number to the nearest 10000, so include anything between 45000 and 59999. The reason for the imbalance there is that someone is unlikely to remember 44000 as being 50000 - more likely they'd think 40000. But someone might remember 57486 as 50000 simply because of the first digit.


Alternatively, if someone searched for 53000 then you'd include from 52500 to 53999 using the same logic.


If you don't get any matches then you'd probably want to broaden the range and try again though. You might set a limit that you'd widen by one level of precision, so if someone puts in 53000 and you don't find anything, then try as though they'd entered 50000, but stop there.


This might seem unnecessarily complex, but the idea behind all this is that you're trying to take what someone remembers and think what that might plausibly match, assuming they're not wildly misremembering of course.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...