Search results for queries with multiple words

  • snfpaper
    Participant
    4 years, 2 months ago #17526

    Is that ~4 meant to be used in the Solr admin? Because when we used it on the WordPress site, all it did was bring back results that also had the number 4 in them.

    wpsolr
    Keymaster
    4 years, 2 months ago #17528

    In Solr admin indeed.

    snfpaper
    Participant
    4 years, 2 months ago #17529

    Is there any type of configuration we can enact to mimic that kind of search (with ~4) on the WordPress site? If yes, please advise. If not, thank you so much for your help – we better understand the behavior of the search now and can inform our users of its behavior.

    wpsolr
    Keymaster
    4 years, 2 months ago #17530

    How are the results in Solr admin? (without and with the “~4”)

    snfpaper
    Participant
    4 years, 2 months ago #17534

    Results from Solr Admin Dashboard

    q=dan volitich “response”:{“numFound”:505
    q= “dan volitich” “response”:{“numFound”:2
    q= “dan volitich”~4 “response”:{“numFound”:3
    q= dan volitich~4 “response”:{“numFound”:515

    wpsolr
    Keymaster
    4 years, 2 months ago #17537

    Are they correct?

    snfpaper
    Participant
    4 years, 2 months ago #17539

    Yes. Responses 2 and 3 are ideal for our site. We are hoping to configure the results accordingly. That way, if someone searches with or without quotations or ~4 on the WordPress site, the results would still return the way they do for responses 2 and 3 from the Solr admin.

    If there is no way to do this, that is fine. We can inform our users about the proper way to search based on their queries.

    wpsolr
    Keymaster
    4 years, 2 months ago #17540

    2 and 3 will probably return many empty results !

    snfpaper
    Participant
    4 years, 2 months ago #17595

    I do not understand. What does that mean? If that is what people want to find (“Dan Volitich”~4), would it not be more helpful than providing results that do not match their query?

    wpsolr
    Keymaster
    4 years, 2 months ago #17596

    It just mean that fine tuning Solr search is a endless task. As soon as you optimize for some keywords, other keywords are not showing enough (or too many) results. And at the end, it’s almost a keyword by keyword tuning that is required, which is obviously impossible.

    snfpaper
    Participant
    4 years, 2 months ago #17597

    Ok, Thanks. Just to verify for us, there is no way to permit some of the search options like ~4 in the WordPress search bar. That way we would not be optimizing, just allowing more refined searching from withing the WordPress interface.

    Thank you for helping us and clarifying all of this.

    wpsolr
    Keymaster
    4 years, 2 months ago #17598

    The Solr query syntax is incredibly flexible. There are literally thousands of ways to customize the user query. And WPSOLR also works with Elasticsearch, and Algolia. Each one with their own syntax.

    Therefore, I would say that there is no way to build a generic “Query customizer UI” that a visitor could use.
    Also, this use case is a very narrow percentage of the general usage for the plugin (“expert mode” vs “simple mode”).

    But the plugin provides many hooks, which a clever developer could probably use to tune the query.

    For instance, the WooCommerce add-on internally uses those hooks to automatically add a filter on all queries to guarantee that they will only return products (and none posts or pages for instance).

Viewing 12 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic.