Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Search is Back

2»

Comments

  • edited February 2010
    Well, found the fix for an empty query and the view crash. Just replace /applications/garden/views/search/index.php content with this code. The view is the only place where the query is not being checked (to be more precise, ResultSet variable from controllers body).
  • ToddTodd Chief Product Officer Vanilla Staff
    Pushed the fix to github. Thanks guys.
  • ToddTodd Chief Product Officer Vanilla Staff
    @Louis. I just noticed that your bug was different than what I fixed. However I am guessing that what you are experiencing comes from only having one post in your test forum. I do believe that if a word occurs in more than 50% of the rows in a table then it will be ignored for search purposes.

    This is by design in MySql. Can you maybe add a few more posts and see if you can search then?
  • edited February 2010
    The forum has just 5 posts, when I search for "Winter", it works, when I search for "write", it doesn't find that one post. I suspect maybe if only one result is found, it returns a relevance of 0, as in relevance should be ignored?

    I'll turn on the debug mode right now, so you can see for yourself. [Edit: Crap, of course, debug mode won't let you run the SQL queries as I did above, but ... I'll try running them again then.]
  • Never mind. It seems to work now ... not sure what changed in the last 2 minutes besides turning on the debugger. It reports a relevance of 2.38214707374573 for that one post.

    I guess I would hope there'd be some way of saying a word is *too* relevant. Or a way of overcoming that limitation. But it's a minor point, as most forums have that kind of "word is too common" limitation, like phpBB or SMF.
  • ToddTodd Chief Product Officer Vanilla Staff
    Yeah. The relevance is kind of locked away in the logic of MySQL, but I think it works well on balance. I'm also guessing that MySQL's full text indexes might lag behind the data a tad as do with most of these type of searches.
  • ToddTodd Chief Product Officer Vanilla Staff
    Another thing. There is another search mode where you can specify simple boolean logic with a + or - before a term similar to search engines. This might give you close to what you want, but is supposed to be slower.

    I'll put a hidden config option in the application for you to try if you want.
  • I wonder if maybe, only for searches which return 0 results, we could swap to a non-relevance based search, perhaps instead a recency-sorted one for just that keyword. And then say "search term too common, results sorted by most recent". If such a generic search reveals nothing, then we know for sure that the word or terms were never used. Perhaps if this uses more CPU or something, it could be a checkbox-- or maybe there's some other trick people are using?
  • Inspires me to work on my sphinx search plugin - nice work on the new search @Todd!
  • Lucene would be even better, but this is still one hell of an improvement over V1.

    Perhaps the styling of the search results could be slightly different for discussion results (the entire thread) compared to comment results (a single post)?

    Also, I don't know if this is relevant, but the addons/plugins search is currently very annoying, since I can search for a plugin by name and although it finds it, it is MILES down the pecking order. Just try it with something like "JQuery" for example :P Also, my preference of V1/V2, recent/popular is not remembered which is pretty annoying.
  • MarkMark Vanilla Staff
    Good points on the addons search. Want to implement the changes? The preferences should be pretty easy to do, at least.
  • Hahahahaha! You overestimate my coding ability. I might be king of the cut 'n' paste coders, but I think that's a little beyond me currently!

    I'll have a look, but seriously, I'm more of a graphics/UI guy than a coder.
  • Just like that eh? :) Thanks for the speedy fix on that Mark, it should mke the addons site a lot more usable for everyone.
  • MarkMark Vanilla Staff
    np :)

    I haven't pushed it live yet. I want to do a big push one of these days, but there are some other minor things I want in there first.
  • Maybe you can add an option to choose which category to search in?
  • i test search function for eastern characters.
    if i wrote "香草就是好" in a post, it should be found by "香草" or "就是" etc.,
    but for now. i can found this post by search "香草就是好" only.
  • LS ...

    match against can not used on any other characters beside english ...
  • i test search function for eastern characters.
    if i wrote "香草就是好" in a post, it should be found by "香草" or "就是" etc.,
    but for now. i can found this post by search "香草就是好" only.
    Let's try this
    http://vanillaforums.org/discussion/12671/cant-search-for-3-character-strings/p1
Sign In or Register to comment.