search sort options (#386)

This commit is contained in:
Cilibiu Bogdan
2018-06-06 14:53:56 +03:00
committed by Denys Vuika
parent f0c0fe162b
commit f30bb86a6e
2 changed files with 36 additions and 7 deletions

View File

@@ -162,33 +162,54 @@
"include": ["path", "allowableOperations"], "include": ["path", "allowableOperations"],
"sorting": { "sorting": {
"options": [ "options": [
{
"key": "score",
"label": "SEARCH.SORT.RELEVANCE",
"type": "FIELD",
"field": "score",
"ascending": true
},
{ {
"key": "name", "key": "name",
"label": "Name", "label": "SEARCH.SORT.FILENAME",
"type": "FIELD", "type": "FIELD",
"field": "cm:name", "field": "cm:name",
"ascending": true "ascending": true
}, },
{
"key": "title",
"label": "SEARCH.SORT.TITLE",
"type": "FIELD",
"field": "cm:title",
"ascending": true
},
{
"key": "modified",
"label": "SEARCH.SORT.MODIFIED_DATE",
"type": "FIELD",
"field": "cm:modified",
"ascending": true
},
{ {
"key": "content.sizeInBytes", "key": "content.sizeInBytes",
"label": "Size", "label": "SEARCH.SORT.SIZE",
"type": "FIELD", "type": "FIELD",
"field": "content.size", "field": "content.size",
"ascending": true "ascending": true
}, },
{ {
"key": "description", "key": "content.mimetype",
"label": "Description", "label": "SEARCH.SORT.TYPE",
"type": "FIELD", "type": "FIELD",
"field": "cm:description", "field": "content.mimetype",
"ascending": true "ascending": true
} }
], ],
"defaults": [ "defaults": [
{ {
"key": "name", "key": "score",
"type": "FIELD", "type": "FIELD",
"field": "cm:name", "field": "score",
"ascending": true "ascending": true
} }
] ]

View File

@@ -236,6 +236,14 @@
} }
}, },
"SEARCH": { "SEARCH": {
"SORT": {
"RELEVANCE": "Relevance",
"FILENAME": "Filename",
"TITLE": "Title",
"MODIFIED_DATE": "Modified Date",
"SIZE": "Size",
"TYPE": "Type"
},
"FACET_FIELDS": { "FACET_FIELDS": {
"FILE_TYPE": "File Type", "FILE_TYPE": "File Type",
"CREATOR": "Creator", "CREATOR": "Creator",