Discosearch: How does it work?


  • Winner of the 2016 Presidential Election

    Could you elaborate on how the search works? Don't you give it a set of data (categories, a topic, any other stream of data) and the search-input and it uses some SQL-magic to filter the data by the rules that are stated in the input (after it has been sanitized, etc)?
    I really don't understand why it behaves differently litterally anywhere I use it.

    I am not even complaining about "Search topics by @Kuro" at my mention-stream. That doesn't make sense but it's fine because thats how the searchbox on the profile appears.

    But how am I supposed to know what rules apply where? I mean, the searchbox looks nearly identical everywhere anyway.

    Also, yeah, I know search will be improved in an upcoming version. Fullpage-search is being worked on by @Sam, I think. And somewhere on meta @boomzilla (if I remember correctly) suggested using "@Username" in the search query as an alias for "user:Username". But I don't know if that takes away the weirdness with the searchbox.

    I dunno, how you are supposed to respond to this post, btw. Maybe just post the appropriate lines of code (if you know where they are of the top of you head) or try to tell me what ruleset applies where. I am probably just venting here.

    Filed Under: I am pretty serious about this, though



  • I don't really know how the search works entirely, either. I've noticed a weird bug where deleting search terms that are in the result can make it go from zero to one.

    But the "Search topics by @Kuro" is implemented as a "search scope", and there are only three currently - Category, Topic, User.


  • :belt_onion:

    @riking said:

    I don't really know how the search works entirely, either.

    I think (don't quote me on this<!-- I SAID NO QUOTING! -->) the search is implemented using Postgres functions, at least partially. But Postgres has many mechanisms for searching intended for different uses + extensions that cover other uses. What exactly is used, how well it is set up, and how it interacts with Discourse backend is presumably non-trivial.

    EDIT: FUCKING AGAIN!

    Note: not angry at @boomzilla, angry at Discourse not allowing me to dismiss this.



  • @Onyx said:

    Note: not angry at @boomzilla, angry at Discourse not allowing me to dismiss this.

    Go to "older notifications," or just the notifications on your profile. There's a button at the top to dismiss stuff.

    FYI: this stuff was moved at @Kuro's request. You should totally blame him.


  • :belt_onion:

    @boomzilla said:

    Go to "older notifications," or just the notifications on your profile. There's a button at the top to dismiss stuff.

    Ok, not letting me dismiss it properly. Damn pedantic dickweeds, all over this forum, I oughta *grumble grumble*

    But that's offtopic again, I'll try to refrain from making any more comments on that for a while at least (so I don't get another one of them).



  • @Onyx said:

    Ok, not letting me dismiss it properly.

    I feel your pain. I opened a related issue on meta.d recently:



  • Discosearch seems to have taken a step back recently.

    It got to the point where, if you knew the right words, you could generally find exactly what you were after but I've struggled the last couple of times even with the right words.


  • sockdevs

    I've been trying to find who first called me a hedgehog for a while now; Discosearch no worky well :cry:

    <!-- Emoji'd by MobileEmoji 0.2.0-->

  • Discourse touched me in a no-no place

    @RaceProUK said:

    hedgehog

    Remind me Monday and I'll see if I can get better luck querying a backup...


  • Winner of the 2016 Presidential Election

    Can @shadowmod get a "search module", please?

    paging @accalia

    Filed Under: Shadowmod can probably replace the whole forum in a year :D


  • :belt_onion:

    @PJH said:

    Remind me Monday and I'll see if I can get better luck querying a backup...

    It's a sad state of affairs when we have to query database backups to find a damn piece of text when using a "modern" platform.

    Maybe Discodevs should just (re)implement grep?


  • sockdevs

    yes, but that be tricky. @shadowmod can see everything but we can't.... so trust permissions as part of the query would be tricky.


  • area_deu

    Maybe they should ask @SpectateSwamp for help?


    Filed under: Holy :cow:, the @-selector works on Konqueror!



  • @Onyx said:

    Maybe Discodevs should just (re)implement

    Or implement search better.
    Like toxic hellstew forums from the 90s managed.


  • sockdevs

    That would be epic cool :sunglasses::smile:

    <!-- Emoji'd by MobileEmoji 0.2.0-->

  • Discourse touched me in a no-no place

    badge_posts?

    Then again I'm not too enamored of the concept to begin with...


  • sockdevs

    @PJH said:

    Then again I'm not too enamored of the concept to begin with...

    and with that there goes that sock module.

    although only searching badge posts would get rid of most of the permissions worries

    still the great and powerful @PJH has spoken! hearken unto his words! :-P


  • sockdevs

    Actually, think I found it:
    @Magus said:

    For best results, @RaceProUK should really learn to reply to you without using your name. That way you don't make yourself the subject of every sentence. Really, you'd think the average hedgehog would know this by now.

    And my reply:
    @RaceProUK said:
    ...and just like that, I gain a fursona... of the wrong gender too...

    …and I kinda started running with it after that. Been enjoying it too, though yesterday kinda sucked.

    But enough of that. On here, I have chosen to be a female hedgehog. And I'm not going to change because of one little incident :relieved:

    <!-- Emoji'd by MobileEmoji 0.2.0-->




  • bleve
    modern text indexing for Go

    So far my research into that solution :wtf:


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.