Support » Plugins » [Plugin: Dave's WordPress Live Search] search results ordered by relevancy

  • Hi everyone,
    Is there way to integrate Dave’s WordPress Live Search Plugin to other search plugins (Better Search, Relevanssi etc.), or just hack it to display results ordered by relevancy?

Viewing 15 replies - 1 through 15 (of 28 total)
  • Dave has added some Relevanssi compatibility to Live Search in version 1.10:

    Possible fix for compatibility with Relevanssi plugin (some concern this isn’t working yet)

    Give it a go and see if it works.

    Thanks msaari,
    I already had Relevanssi installed but unfortunately live search results seem to be unaffected by this or any other search plugin I’ve tried.

    Dave’s plugin calls WP_Query::query method; is Relevanssi expected to change the output of this method?

    Imho, integrating Relevanssi’s search quality with the ease and speed of live search will take the wp search one step further.

    I never knew for sure if Relevanssi was working right and didn’t want to spend the time to find out. The important issue at the time was that WordPress blew up when both plugins were activated and someone did a search, and once that was fixed, I left it.

    Here’s the WordPress query process, along with notes on what hooks are called:

    Any plugin that implements the posts_where, posts_join, posts_groupby, posts_orderby, posts_distinct, posts_fields, post_limits, posts_where_paged, posts_join_paged, or posts_request filters should be able to alter the results shown in Dave’s WordPress Live Search. That’s the way I was hoping these search enhancing plugins would do it.

    Relevanssi is using the the_posts filter to throw out the lists of posts WordPress selects and substitute its own. This should be getting invoked at the bottom of WP_Query::get_posts(), which is called from WP_Query::query().

    I might get a chance to dig into this over the weekend, but you might want to check with the author of Relevanssi too and see if they have any idea why their code might not be getting called.

    I think — and I am the author of Relevanssi — at least part of the problem lies in the fact that Relevanssi uses is_search() to choose whether to fetch search results or not (it’s the only way to know if there’s a search going or not, and a fairly unreliable at that, but I haven’t come up with anything better). The live search won’t trigger that one.

    With some changes to both Dave’s Live Search and Relevanssi I managed to get Relevanssi active in the live search, with highlighting and all, but: it’ll only show the best hit, and nothing else.

    To get the plugins work together would require lots of work on Relevanssi, as the current query function is based on using $wp and $wp_query global variables and won’t work with custom WP_Query objects.



    @msaari, not to hijack the thread, but could you get Relevanssi to work with Search Light, or would the same issue prevent that?

    @msaari – I kind of just came to the same conclusion. I got it working by shoving a reference to my WP_Query object into the global $wp_query (which is how it used to work before I added WP E-Commerce functionality). I’m actually getting multiple results with highlighting and everything now, but I could see issues cropping up with how closely your plugin interacts with WP_Query. I just can’t guarantee they’ll always work nicely together.

    Search Light doesn’t use WP_Query, but instead modifies the MySQL query directly. Relevanssi won’t work with Search Light.

    I’ll have to see what I can do to make Relevanssi more flexible. I do have some ideas.

    I’ve got this now. Once I get a new version of Relevanssi out and Dave fixes Live Search, we’ve got something that should work just fine.



    Great! When can we expect that?


    The new 2.5 version of Relevanssi supports it, so as soon as Dave releases a new version of Live Search, it’ll work.



    Awesome, can’t wait. Dave?


    The development version at has the new Relevanssi code. Give it a try and let me know how it works for you. Seems ok on but I want confirmation from someone else.



    Seems to work like a charm for me! Thanks, you guys rock!

    Sadly it doesn’t seem to work for me.

    When activating Both plugins I don’t get to see any LIVE-search results.
    When activating ONLY Daves’ plugin I get to see the live-search results and when activating ONLY Relevanssi I get to see better search results.

    I get to see the ajax-loading circle in the search-box. Just no results are shown.

    It doesn’t seem to matter which theme I use twentyten & thematic framwork both don’t show any results.

    Any thoughts how to solve this or what I can do to solve it?

    Actually, it doesn’t work for me either. It worked for me when I first tested the system with the modified previous version, and it looks pretty the same to me now, so I don’t know what’s going on.

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘[Plugin: Dave's WordPress Live Search] search results ordered by relevancy’ is closed to new replies.