Changing search to AND instead of OR

  • robpl1
    Participant
    1 year, 6 months ago #26677

    Hi,
    I’ve noticed while testing the search out that it appears to list every WooCommerce product that has any one of the search terms in it What this means is that if i search for, say, “Elgar Cello Concerto” What I get is everything that has Elgar, everything that has Cello and everything that has Concerto which can mean I get 16,000 results. It’s looking as if the search is “Elgar, OR Cello, OR Concerto” Where what I need is “Elgar AND cello AND concerto” which would result in about 5 results (because there are 5 different publishers who have that music score). Is there any way of setting this up? Two reasons for wanting to do so, firstly it will return what I need on the Yith Ajax dropdown, and secondly with thousands of results the search results page takes ages to display – up to a minute – by which time any would-be purchaser has long gone.

    wpsolr
    Keymaster
    1 year, 6 months ago #26678

    What search engine do you use?

    robpl1
    Participant
    1 year, 6 months ago #26679

    Apache Solr

    robpl1
    Participant
    1 year, 3 months ago #27076

    The image at Search results shows the problem I’m getting. The search term is “Elgar Cello Concerto”. Only items that match that search string should be displayed. However the search results page shows only one that matches with the rest being extraneous and the Yith Ajax Search (Free) shows several results only 3 of which are wanted. These extra items are showing because the search returns answers that match any term in the search box where I need it to return only those that ALL the terms in the box.
    Search engine is Apache Solr
    web address is chimes music

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.