Skip to content

Commit

Permalink
Search / Sort by / Fix multiple fields
Browse files Browse the repository at this point in the history
eg. `resourceTitleObject.${searchLang}.keyword,resourceTitleObject.default.keyword`

should create a filter

```
[
    {
        "resourceTitleObject.langdut.keyword": "asc"
    },
    {
        "resourceTitleObject.default.keyword": "asc"
    },
    "_score"
]
```
  • Loading branch information
fxprunayre authored Apr 3, 2024
1 parent 58982a5 commit f421c15
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
params.sort = [];
sortBy.split(",", -1).forEach(function (value, idx) {
if (value != "relevance") {
var sort = {};
sort[getFieldName(mappingFields, value)] = orders[idx] || "asc";
params.sort.push(sort);
}
Expand Down

0 comments on commit f421c15

Please sign in to comment.