Skip to content

Commit

Permalink
new facet order_by option: value
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm committed Aug 29, 2024
1 parent 28b162c commit 3da1809
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/services/search-facets/search-facets.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ const getAndFindHooks = (index: IndexId) => [
count: {
count: 'asc',
},
'-value': {
index: 'desc',
},
value: {
index: 'asc',
},
}),
},
group_by: {
Expand Down
2 changes: 1 addition & 1 deletion src/services/search-facets/search-facets.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const facetNames: Record<IndexId, string> = {
'tr-passages': 'text reuse passages index',
}

export const OrderByChoices = ['-count', 'count']
export const OrderByChoices = ['-count', 'count', '-value', 'value']

const getGetParameters = (index: IndexId): QueryParameter[] => [
{
Expand Down

0 comments on commit 3da1809

Please sign in to comment.