HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Search no more...

This discussion is related to the Find addon.
R_JR_J Ex-FanboyMunich Admin

FIND!

Here's a replacement for Vanillas default search, but by now it is only a preview and therefore, when you enable it, nothing will change.

Please see the description on the addon page in order to get it working. I planned to be ready before christmas but I guess I have no chance reaching that goal and so here is what I've got by now.

Maybe it doesn't scale at all and no one can use it in a live environment. But it was a a nice coding experience nevertheless.

And being able to search for +word1 -word2 posted by userX in discussion between 2014/10/01 and 2014/11/15 is fun!

hgtonightphreakLincBleistivtperegrine
«1

Comments

  • It is a security risk to have a big process start upon loading a page such as the /secretword link.

    R_J
  • R_JR_J Ex-Fanboy Munich Admin

    I know and I'm not happy with that :/
    I thought on giving it a permission check, but then you would have trouble to use it with a simple cron call.

    In order to make this somewhat better, I did the following: write the last DateUpdated/DateInserted to config and only index those files that are Inserted/Updated after that point in time. In order not to drop some discussion I use ">=" for comparison and therefore always at least one discussion+comment is indexed.

    I guess I'll add a delay into it so that the function returns right at the beginning if the last start has been less then X minutes before. That must be enough.

  • R_JR_J Ex-Fanboy Munich Admin

    Oh, permission check is still in there! I wanted to remove that...

  • AnonymooseAnonymoose ✭✭
    edited December 2014

    Why not schedule it, and control the schedule without cron. For example, set the indexer to run every 24 hours, and have the search process check to see the last indexer run time each time someone starts a real search. Of course, this should be invisible to the user.

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited December 2014

    @R_J: Cooool! Can't wait to try it out. I'm just hell of busy right know (who's not?) but will report soon after christmas.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • R_JR_J Ex-Fanboy Munich Admin

    @Anonymoose: I've started by using Discussions and Comments AfterSave, but the index process will take its time and so my first intention was to look for "asynchronous" php execution, so that the user doesn't have to wait until the index process is finished. But I found nothing that is suitable for hosted installations. That's why I think that any indexing started, based on user interaction, will block the user, wouldn't it?

    @phreak: it would be great to get some feedback of someone with up to 100k posts in his forum! I'm not sure what the best way is to get the initial indexing done, maybe a batch that uses wget... If you really like to try it, please wait for a next version. I'll implement a log for tracking the time the indexing takes. I also would like to show (to admins only) how long a search has taken. I would be very interested to get such info from you!

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    @R_J: Roger that. Have a board with 700.000+ comments, also the topics are often with similar keywords, so will the search entries be. It's a 2.0 board i'm running a copy on 2.1+ still configuring the redesign and relaunch of this upgrade. Might be good playfield for testing purpose.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • LincLinc Detroit Admin

    Ambitious! Great job on the inline docs.

  • R_JR_J Ex-Fanboy Munich Admin

    @phreak: 700k is not a good playfield - it will be a tough stress test! ;)

    @Linc: thanks, it feels really complex to me and I wish I had ideas how to simplify the structure of the code. Commenting every single step shall help me not to loose track in my own code... :/

    phreak
  • AnonymooseAnonymoose ✭✭
    edited December 2014

    I like to send such heavy processes to execute only after passing on all html content to the requester, but I don't usually work with php, and not sure how it would work with the garden framework.

  • @Anonymoose said:
    I like to send such heavy processes to execute only after passing on all html content to the requester, but I don't usually work with php, and not sure how it would work with the garden framework.

    http://php.net/manual/en/function.pcntl-fork.php#94338

    grep is your friend.

    Shadowdare
  • AnonymooseAnonymoose ✭✭
    edited December 2014

    Many useful tips there. Good stuff.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I guess the first one did not go well how about this @R_J ?

    R_Jperegrinewolfgang
  • R_JR_J Ex-Fanboy Munich Admin

    Sorry for not giving feedback! I'd prefer a simple "flat" style icon for that one and already thought about combining something like this and that

    vrijvlinder
  • peregrineperegrine MVP
    edited December 2014

    I'd let you have icon the one in the plugin link below is not copyrighted.

    you can put the magnifying glass over the lemur's nose. :)

    http://vanillaforums.org/addon/noroleassigned-plugin

    i vote for the first icon by V. - http://vanillaforums.org/discussion/comment/222135/#Comment_222135

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @R_J said:
    Sorry for not giving feedback! I'd prefer a simple "flat" style icon for that one and already thought about combining something like this and that

    Ok, kein problem. Just so you know, the braille version of those icons you like is equally hard to know what they are... ;)

  • peregrineperegrine MVP
    edited December 2014

    @vrijvlinder said:
    Ok, kein problem. Just so you know, the braille version of those icons you like is equally hard to know what they are... ;)

    http://www.google.com/insidesearch/features/voicesearch/

    I would have called the plugin "finden Wurm" for the search terms you can't get out of your head( "FAQ, Documentation").

    Exactly like but different :wink:

    http://andrewhammel.typepad.com/german_joys/2005/04/german_word_of__1.html

    maybe next week the word will be FindenWurm

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinderR_J
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I guess this one is too 3D , but it is cool ..

    R_Jphreakperegrine
  • peregrineperegrine MVP
    edited December 2014

    V, I'd like to place an order for the above image, but with a different avatar face.and a purple body.

    I have just the plugin for it.

    I'm glad r_j is sleeping :smiley: , so I can usurp above icon

    perfect thanks.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.