All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Searching giving different sorting results?

Jason Boothman 21 Apr 2014 15:46 question, complete

It's my understanding that by default Low_Search orders by relevance? If that's the case I have an interesting issue on my page.

If I search from simple search field, I'm not sure how it's ordering the results, but then when I search from the results page (using the filter I set up) and "Relevance" selected it orders different (correctly). Any ideas why?

You can view it in action at the below website. Trying searching the term "Biology".

http://catalog.huntington.edu

Replies

  1. Low 21 Apr 2014 20:37

    I noticed that your URI contains two ? which could mean your setup uses a query string for the regular segments already. Having the search query as GET vars may interfere with this. I'd recommend using the encoded query instead, even if it now seems to work OK.

    If you want to look whether it's sorted by the score, you can try outputting {low_search_score} in the search results. That will give you some idea of what's going on.

    The Results tag may be of influence here, too. What does the opening Results tag look like at the moment?

  2. Jason Boothman 24 Apr 2014 14:05

    The reason I had turned Encode Query off is because with it on, I get no search results. If I turn it on, I do.

    Our URL contains a ? because we're currently on a Windows server which forced us to turn "force URL query strings" on in order for the site to work correctly.

    Opening results tag...
    {exp:low_search:results query="{segment_2}" status="not closed" disable="member_data|category_fields" search_mode="all"}

    I've added the scores at the end of the search titles in parenthesis if you want to check them out. By adding the scores I think I found the issue. On my "Course Introductions" collection I have a modifier with the thought being so that collection would always display first.

    It looks like on the initial (simple) search, the modifier isn't being taken into account. If I do an initial search on "art" then the "Visual Arts" result returns a score of 7.51. If I don't change a thing and just click search on my filtered results section the modifier is now taken into account and that same "Visual Arts" results now returns a score of 71.34.

  3. Jason Boothman 24 Apr 2014 14:08

    If you search other things, such as "biology" the same thing happens for results such as "Biology", "Physics" and "Chemistry" - essentially, anything in the "Course Introductions" section where I have a modifier set.

  4. Low 24 Apr 2014 14:31

    I can't test properly right now, as I'm abroad attending a conference. You might be able to work around the issue by adding a hidden input element to the Form tag, with a name="collection" and the value that should contain all your collection names, separated by vertical bars.

    Also, if you're not on the latest Low Search version, try upgrading.

    Will so some proper testing as soon as I can.

  5. Jason Boothman 24 Apr 2014 14:38

    As always, thank you for your quick reply.

    I added the hidden form variable as you suggested, and that did the trick. It now properly sets the modifier on the simple search as desired. Thank you!