Question: How to use Custom Sort Fields

(from github.com/stm0209)
Would you tell me Custom Sort Fields?
I added additional Facet field,but not available as Sort Fileds.

I set it as follows and used it.
If I need to do something else, please let me know.

#fess_config.properties
query.additional.response.fields=facet1
query.additional.api.response.fields=facet1
query.additional.cache.response.fields=
query.additional.highlighted.fields=
query.additional.search.fields=facet1
query.additional.facet.fields=facet1
query.additional.sort.fields=facet1
query.additional.not.analyzed.fields=

#api query
Sample1
http://localhost/json/?&q=&sort=facet1.desc
Sample2
http://localhost/json/?&q=
+sort:facet1.desc

(from github.com/marevol)
You need to set a proper field type in app/WEB-INF/classes/fess_indices/fess/doc.json.
I think it should be keyword type.

(from github.com/stm0209)
I truly appreciate your quick reply.

I set it as follows and used it,but remain unchanged.
Are there any other hints?

#doc.json
},
“url”: {
“type”: “keyword”
},
“facet1”: {
“type”: “keyword”
}

(from github.com/marevol)
Did you recreate index?

  1. Edit doc.json
  2. Run reindex with updating aliases in Upgrade page