Gravatar for

Question by ncipollina, Sep 25, 2016 9:55 PM

Sort by Distance With Additional Field

I am trying to apply a sort by a date and a $qf distance field. The sort works when sorting on just the date field, but does not additionally sort on the distance field. If I remove the date field and sort only on the distance field, the distance sort works. If I add any other field in addition to distance, the distance sort does not work. Is this intended behavior?

Thanks in advance, Nick

1 Reply
Gravatar for

Answer by Simon, Sep 26, 2016 9:26 AM

You can usually sort on multiple fields (except Relevancy):

You have an example here:

How are you applying your sort? Through the REST Search Api? Through JavaScript using our framework? Using a sort component?


Gravatar for

Comment by ncipollina, Sep 26, 2016 9:38 AM

We are setting it via the sortCriteria field. I can tell you it is definitely not honoring the sort by distance after the sort by date or any other field that we have.

Gravatar for

Comment by Simon, Sep 26, 2016 9:44 AM

I redirected your issue to our support.

Ask a question