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

Support archive

Collection Modifier not working

Leah 8 Apr 2019 13:08 question, complete

We have a particular channel that we'd like to appear first in the search results.
In the collection settings, we have set the modifier to 999 and all the channel fields to 3. All other collections have lower modifiers and channel field numbers.
A test entry in this channel has more references to the keyword that is being searched for but it still isn't being returned first in the search results.
Do you know where we could be going wrong please?

Also, we're not setting 'orderby_sort' in the results tag, what is the default 'orderby_sort' please?

Thanks

Replies

  1. Low 8 Apr 2019 18:12

    Note that this only applies to Keyword searches, as they produce a relevance score. If you're not using the Keywords filter, start by using that.

    The modifier is multiplied by the calculated score, which is generated by MySQL's full-text functions. Those functions are a black-box. There's no real way of telling how they calculate it. So, if MySQL finds an entry relevant by 0.01, then 999 is multiplied, resulting in 9.99. If another entry gets a relevance score of 10, it's still higher up.

    The best way to ensure the order by collection, is to use the Order by Collection option for the Keywords filter.

    As for the default orderby_sort="" value: that parameter is a way to set both the native orderby="" and sort="" parameters. The former defaults to entry_date, the latter to DESC. However, if the Keywords filter is triggered, the default for the orderby="" parameter is low_search_score.