Clebeuf / beLocal

Connecting local farmers and foodmakers with the community.
http://belocalvictoria.me
Other
4 stars 0 forks source link

fixed the numeric search issue #86 #103

Closed rpanjwani closed 9 years ago

scottlow commented 9 years ago

Sweet! This works fine for me for both numeric and special characters. I don't mind to pull it in once it gets sign off from @sheoranjs24 or @Clebeuf :)

sheoranjs24 commented 9 years ago

It works fine for numbers but it doesn't work for special characters. Also, I was wondering why search activates only after entering at least two characters in the search box. Is this the expected functionality?

screen shot 2014-12-13 at 11 51 16 am screen shot 2014-12-13 at 11 50 44 am

rpanjwani commented 9 years ago

the expected functionaity is minimum two characters. the tokenizer currently doesn't seem to match on special characters. I can look at customising it, but how important is this functionality to us at this point? Maybe create a separate ticket and prioritize it?

scottlow commented 9 years ago

@rpanjwani Didn't you already fix special characters though? They're matching in autocomplete, so I'm not sure why search wouldn't be working. Potentially a regression?

Do you mind taking a peek at it at least and reporting just how hard it would be now that we have a custom tokenizer?

Also, just as a side note, entering a search term of just '&' throws a 500 error. I don't think this a huge deal, but it would be nice to address.

rpanjwani commented 9 years ago

Cool I'll take a look.

rpanjwani commented 9 years ago

@scottlow @sheoranjs24 I've fixed the 500 issue caused by & and #. let me know if you discover any other issues.

With regards to matching special characters, we never were matching solely on special characters. The original problem was when we selected autocomplete matches with special characters in them, it broke the search because the URI wasn't encoded.

Also, we don't have a custom tokenizer yet. I've just customised the search settings to fix the numeric issue. I've looked into matching on special characters and it involves having our own tokenizer and/or filter and I think it involves a fair bit of work and would probably involve installing another library.

Not sure if matching solely on special characters can be considered a priority at this point. can you think of any product or vendor names that might have special characters that people would really need to base their search solely on? Thoughts?

scottlow commented 9 years ago

@rpanjwani Thanks! And right. I had forgotten what the issue was exactly, but I think that having special characters not breaking autocomplete is good enough for now.

I'll leave this discussion open just in case anyone has other thoughts.

scottlow commented 9 years ago

@rpanjwani I'm gonna pull this in as it seems to be working, and it contains some important fixes especially for the live version of the site.