The things you can do with search

Posted on
Page
of 7
First Prev
/ 7
  • Have you considered Elastic search?

    No-one has ever shown me a good way to use Elastic Search and yet have it trim the results by permissions.

    We have 3 sets of permissions that need applying to everything:

    1. Is this in a forum you're allowed to view?
    2. Is this in a private message you're allowed to view?
    3. Does it exclude the forums, items and profiles that you are ignoring?

    I could potentially do #1 trivially, but #2 is harder to imagine how it's done (given that participants can be added and removed so easily and changes have to be guaranteed to be instant) and #3 screws me right over.

  • I spent ages searching for this yesterday (Dads/Mums on the forum) https://www.lfgss.com/conversations/1575­46/ and noticed that there wasn't a space between 'dads/mums'. There is a space now so I don't need to suggest this change to thread title.

    Just checking that this was the reason why the thread didn't come up when I searched?

  • It was the reason, and now I've noticed and fixed it.

    Also... children, ugh. I think I'm allergic.

  • My child is 33 so less of an allergen

  • Ah, that would explain why I couldn't find that thread a few weeks ago.

  • That works.

    My definition of child is basically (my age / 2) + 7... so right now, anyone below 28 is a child to me.

  • This also happens to be the equation for determining whether someone is too young to sleep with.

  • My child is still a child by that equation (=35) to me...
    I'll need some anti-histamine when I next see him...

  • @Velocio How do I search for the exact term "Crewe" (as in the town)? Search keeps returning posts with "crew" in.

  • You can't.

    Hmm.

    This is the problem with language search.

    Most people hate it, because exact match never gets plurals, etc correct. But if one does language based search (which I did) then the exact match doesn't work either.

    I have to upgrade the database soon, I'll see if the search offers any new features in this area.

  • OK, in theory... this may be possible with some more fun on my side, but I'll leave it until after I upgrade the database (in a couple of weeks time).

  • Is it possible to use - in front of a word to remove results (like google)?

    Edit: In future I mean, I can answer the now question myself (no)!

  • PostgreSQL isn't Google :)

    The query syntax differs, and because it goes to a database I escape it all for safety.

    It does have some switches that can do exact match, but to avoid escaping I'd need to sanitize the input another way and stitch it back together.

  • Cheers for the insight. Google might be my best bet for now.

  • Is there an easy way to search for a comment by a particular person in a particular thread?

    For instance this is searching for comments by me with the word "wallpaper" in the "Home DIY" thread

    https://www.lfgss.com/search/?q=wallpape­r+type%3Acomment+type%3Aconversation+id%­3A178667+authorId%3A59312
    

    To do this though I have to find where I have this template and manually edit the URL with search term, conversation ID (which I've found by searching for the conversation) and author ID. It takes multiple tabs and lots of back and forth.

    Similarly, searching for all comments by a user in a certain thread also involves manually editing the URL. Am I missing something easy?

  • I too would like to know this.

    @Velocio?

  • Easy... no.

    Difficult... not really.

    So long as you know the profile ID that you want to search, then inside a given thread on the right hand side is a search box that allows searching within a thread.

    In that box enter authorId:59312 and hit enter.

    Tada... you have now filtered this thread to just your comments.

    This can be done for any authorId in any thread whilst also combining it with any search terms.

    Additionally you can use that in the top level query to search for search terms by an author across the site (but remember to uncheck the "Search titles" bit).

  • I know that no dev is happening in the platform right now. But can I add a vote for a future feature request to allow us to use "@mashton" instead of the authorid of 47759, when doing this kind of searching?

  • Isn't the issue there the fact that people can change their username but not their authorid? so would either only show comments from latest username or would need to do something in the back end that translates the username to the authorid?

  • I would be OK with it just doing a translation from "current user name" to authorid.

    The only problem would be not being able to search by an old username. Seems a bit edge case and is a current limitation anyway - as it stands you can't search by past or current username.

  • Cheers, that's easier than my current method (although I'd add a request for just being able to put @aggi rather than having to look up the author id)

  • That was the original plan, and then we ran out of money and I'm just crap with actually making UI.

  • a future feature request to allow us to use "@mashton" instead of the authorid of 47759, when doing this kind of searching?

    This.

    And / or a way to search usernames maybe.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

The things you can do with search

Posted by Avatar for Velocio @Velocio

Actions