Options

search box behavior

mishenkamishenka Banned Posts: 470 Major grins
edited December 3, 2013 in SmugMug Support
Question for SmugMug developers and their managers: is there any particular reason why you left search content box wide open for "wildcards"? Typing ANY non-alphabet character on a keyboard apparently returns ALL images.

Comments

  • Options
    beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited December 2, 2013
    rolleyes1.gifroflrolleyes1.gif
    Yippee ki-yay, footer-muckers!
  • Options
    beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited December 2, 2013
    Oddly, on my site a search for "$" returns 4040 results but searches for "£" or "€" return none. It looks like it's searching the code itself, rather than just the text.
    Yippee ki-yay, footer-muckers!
  • Options
    pbandjpbandj Registered Users Posts: 237 Major grins
    edited December 2, 2013
    Not sure it's exactly searching the code either...I tried just about every special character on my keyboard and it returns all photos for each one. Even if I search for a combination of them (a combination I'm pretty sure doesn't exist in the source code), it returns all photos. For example, I searched for: ?;'&~!
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited December 2, 2013
    Is that a problem? Those same images can be found by doing a date search on your site, so it's not exposing anything that wasn't already visible.
  • Options
    beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited December 3, 2013
    Lamah wrote: »
    Is that a problem?
    You can be the judge of that - for me a search for "$" should find nothing but returns all of my images, yet none of my images have "$" in the title, caption or anywhere else. It's returning stuff that it shouldn't, so it's knackered.
    Yippee ki-yay, footer-muckers!
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited December 3, 2013
    Search engines search for words. It's really rare for search engines to consider symbols like "£" a word, so they normally don't index them and they cannot be searched for. Heck, try searching for it on Google:

    https://www.google.co.nz/search?q=%C2%A3&oq=%C2%A3&aqs=chrome..69i57j0l5.418j0j7&sourceid=chrome&espv=210&es_sm=91&ie=UTF-8

    Simple ASCII punctuation like "*" is normally stripped out before search begins, since they won't be found in the search index, which'll result in an empty search query that'll return every single photo. Unicode characters like "£" might avoid that stripping, since they're difficult to identify as punctuation, so they end up being searched for as words.
  • Options
    beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited December 3, 2013
    So why does a search for "⌀" on my site return 21 images, which IS correct, yet searching for "⌀" on Google returns nothing?

    Anyway, SM ain't Google. Chalk and cheese, you can't compare them.

    Sorry for the late edit.
    Yippee ki-yay, footer-muckers!
  • Options
    mishenkamishenka Banned Posts: 470 Major grins
    edited December 3, 2013
    Lamah wrote: »
    Is that a problem? Those same images can be found by doing a date search on your site, so it's not exposing anything that wasn't already visible.

    Yes, it is a problem. If I have a search function on my (gee... I guess "my" does not apply anymore for SM accounts) site then it is my decision whether or not allow wide open search.
    Lamah wrote: »
    ...Simple ASCII punctuation like "*" is normally stripped out before search begins, since they won't be found in the search index, which'll result in an empty search query that'll return every single photo....

    Sorry, Nicolas, you lost me here. Why exactly, under what logic, should an empty search query return every single photo?
  • Options
    pbandjpbandj Registered Users Posts: 237 Major grins
    edited December 3, 2013
    It's all kinda mixed up. If I enter nothing in the search box, it returns no photos...so it's not just stripping out the special characters (or if it is, it's doing so very oddly). Empty search criteria returns no photos, but practically any special character on my keyboard (including any combination of them) returns all photos. And oddly, they do seem to be treating an asterisk as a wildcard. On my test site, if I enter "bi" as the search argument, I get no results, but if I enter "bi*" I get five hits (and this doesn't pick up any keywords that start with bi, only caption text). Given that an asterisk seems to act like a wildcard, it kind of makes sense that a single asterisk without any characters would return all photos. But other special characters also return all photos even though they are not treated like wildcards (I get no results if I enter "bi%" in the search box).
Sign In or Register to comment.