WordPress.org

Ready to get started?Download WordPress

Forums

Plugin: search reloaded (45 posts)

  1. Denis de Bernardy
    Member
    Posted 9 years ago #

    http://www.semiologic.com/projects/search-reloaded/

    Search reloaded is a bid to significantly improve the default WordPress search engine.

    The current relevance criteria is simplistic to say the least, but still more relevant that a date. Moreover, the search reloaded plugin searches in pages in addition to posts, and ignores html tags.

  2. piginzen
    Member
    Posted 9 years ago #

    Sounds like a good plugin... However hate to be the one with bad news, but after trying to index all my posts... it crashed about 15% in to it... FYI, i have about 1400 posts...

    Thanks and looking forward to later versions....

  3. Denis de Bernardy
    Member
    Posted 9 years ago #

    ok. i'll fix this in v.0.2

  4. reevo
    Member
    Posted 9 years ago #

    OUCH!

    Just installed it and if crashed my whole site!!!

    The only way I could get back into any of it was to delete the plugin directly. I was unable to deactivate it as I couldn't even get to the plugin page to do that.

    Does the plugin alter any of the other WP code? Will there still be references to it in the WP code because I couldn't deactivate it? If so what and where. Are there any implications to deleting this plugin in the way I have? Is this going to cause me problems down the line?

    What a bother :-(

  5. Denis de Bernardy
    Member
    Posted 9 years ago #

    It's essentially non-intrusive, really. It:

    - creates a table
    - stores a clean version of your posts within in
    - hijacks the loop when search queries occur

    when it is first called, it echoes a series of lines, one to a post that gets indexed. this generates an error (headers already sent) when the indexing is complete; just this once. follow a random link and the error will never be seen again.

    there are no implications in the way you deleted the plugin, beyond the fact it will still be 'actived' when you try the next version. at your option, drop the table wp_sem_nodes.

    btw, could you be more specific on the errors? i would hate to leave this unsolved.

  6. reevo
    Member
    Posted 9 years ago #

    Sorry, can't elaborate as I didn't write the error messages down. It was doing the initial search and then bombed as it was doing so with an error in bold. Then every page that I tried to get to on my site was showing the same page with a list of indexed posts with the error at the bottom.

    Thanks for the speedy reply.

  7. Denis de Bernardy
    Member
    Posted 9 years ago #

    ok, thanks a lot for the feedback. this should be fixed in v.0.2, which will silently create the index in a less straightforward manner.

  8. piginzen
    Member
    Posted 9 years ago #

    excellent!

    looking forward!

  9. restlessbtvs
    Member
    Posted 9 years ago #

    It can't be the number of posts that is a problem as my site has 3396 posts and the plugin works perfectly. Thanks, Denis-de-Bernardy, for fixing my problematic search system!

  10. dee
    Member
    Posted 9 years ago #

    This there any way to get the plugin to recreate the sem_nodes table again? I accidently deleted mine and now it won't run the way it did when it was first activated.

  11. Denis de Bernardy
    Member
    Posted 9 years ago #

    incidentally, there is... uncomment the line:

    //update_option( 'sem_search_version', 0 );

    load a wp page when logged in as admin, and then comment it back again. :)

  12. mfiorentino
    Member
    Posted 9 years ago #

    Great plugins you make!
    (And I'm not being ironic here - I mean it...!) :-)

    I want to add to the problems: When installing the plugin, and doing a search within the admin area I get this error:

    WordPress database error: [You have an error in your SQL syntax near 'AND comment_approved != 'spam' ORDER BY comment_date' at line 1]
    SELECT * FROM wp_comments WHERE comment_post_ID = AND comment_approved != 'spam' ORDER BY comment_date

    Uninstalling the plugin removes this error. Otherwise I have had no problems (I haven't enabled it on my site yet, though - still in the progress of switching blog systems).

    Cheers!
    m

  13. Denis de Bernardy
    Member
    Posted 9 years ago #

    i can't reproduce. where exactly are you searching in the admin area?

  14. Denis de Bernardy
    Member
    Posted 9 years ago #

    Search reloaded is now v.0.3

    it now searches in excerpts, and it now silently conducts the indexing at the rate of 100 posts per page view by the admin, to avoid time outs when you have plenty of posts.

  15. poons15
    Member
    Posted 9 years ago #

    I just uploaded your new version of this plugin v0.3, but I am still having the same problem as before. It only searches for the word if its in the title of the post.

    If I search "password", only the posts that have "password" in the title, will come back as results, instead of all of the posts and pages that contain that word.

    Is there a way to fix that?

    Thanks!

  16. Denis de Bernardy
    Member
    Posted 9 years ago #

    the Content with show/hide javascript for "more" plugin will wreck any subsequent filter applied to the_content. And no matter how much you flush your node index, search reloaded will be broken.

    Speaking of flushing your node index, v.0.4 is out, fixes a bug and adds that feature. To use it, visit the following when logged in as admin:

    http://www.yoursite.com/?flush=1

  17. dbenton
    Member
    Posted 9 years ago #

    Bug report:
    posts_per_page can be set to -1. If this is the case, search reloaded creates an invalid LIMIT clause in sql queries.

    I hard-coded an override in mine:
    after:

    if ( !$posts_per_page )
    $posts_per_page = get_settings('posts_per_page');

    I added:

    if ( $posts_per_page == -1 )
    $posts_per_page = 18446744073709551615;

    In reality, if posts_per_page is set to -1, there should be no LIMIT, but this is the workaround suggeted by the MySQL Documentation. Interesting number.

    On a side note, search reloaded doesn't seem to play nicely with wpPaginate. I have version .2.2 of wpPaginate "for wp 1.5".

  18. dbenton
    Member
    Posted 9 years ago #

    Oh yeah, nice plugin. Thanks for all the work Denis-de-Bernardy.

  19. Denis de Bernardy
    Member
    Posted 9 years ago #

    thanks for the bug report.

    v.0.6 removes the limit statement when posts_per_page is -1.

  20. Denis de Bernardy
    Member
    Posted 9 years ago #

    what's the difference between paginate and custom posts per page?

  21. dhoughal
    Member
    Posted 9 years ago #

    Maybe I'm totally dumb, but I can't get the plugin to work. I installed it, activated it and tried a search but got no search results.

    Any ideas?
    D.

  22. Denis de Bernardy
    Member
    Posted 9 years ago #

    as admin, try running yourblog.com/?flush=1, visit a couple of page (it indexes 100 posts per page view), and try again

  23. Denis de Bernardy
    Member
    Posted 9 years ago #

    i've just uploaded v.1.0, which fixes a security hole

  24. dhoughal
    Member
    Posted 9 years ago #

    One more problem:
    When Search Reloaded is activated a search for the string "page" won't find posts which include "frontpage". Without Search Reloaded they will be found.

    ?

  25. Denis de Bernardy
    Member
    Posted 9 years ago #

    yup, it's normal: the plugin searches for full words, as opposed to a %like%

  26. dhoughal
    Member
    Posted 9 years ago #

    Are there any possibilities to do truncated searches with Search Reloaded?

  27. Denis de Bernardy
    Member
    Posted 9 years ago #

    if you mean to find 'apple' in 'apples', not at the moment -- but I'll likely be exploring this in the future.

  28. dhoughal
    Member
    Posted 9 years ago #

    I think for naive users like me it would be nice to include the following facts into Search Reloaded's documentation:

    - Run "http://yourblog.com/?flush=1" as admin to initialize the plugin after first installation, otherwise searching will be impossible.
    - No %like% searches possible in contrast to standard WP search mechanism.

    Cheers
    D.

  29. dbenton
    Member
    Posted 9 years ago #

    Paginate creates a set of links: one for each page of results (like the o's at the bottom of Gooooooogle's results).

    Custom posts per page allows one to set post_per_page dependant on type of query (category, author, date, etc...)...I think...

  30. dbenton
    Member
    Posted 9 years ago #

    Oh yeah, a little more info on the paginate problem:

    wpPaginate runs two queries, one slightly modified (with posts_per_page=-1, and paged=1) for the purpose of determining the total number of posts returned (which is then used to determine the number of pages).

    The problem is in the result of this first query. Here's a snippet of the code in question:

    $tempposts = query_posts($tempquery_string);
    $num_of_pages = ceil(count($tempposts)/$num);

    The problem being that count($tempposts) is always 1 when search reloaded is activated.

    I'll post here if/when I learn more.

Topic Closed

This topic has been closed to new replies.

About this Topic