Open diegonc opened 11 months ago
BTW I first found this issue in a custom product based DataDocument where pseudoId is a Sortable field. I checked that the keyword subfield is actually generated and the ordering doesn't work.
After posting this issue, I realized that, in MantleProduct, pseudoId is not sortable.
And a workaround I found is to populate the mappings of the index with a field of keyword type ({"properties":{"pseudoId":{"type": "keyword}}}
) before running the feed index process. But I'd prefer if the search service could handle the keword subfield of sortable columns of the data document-
The following URL gives a 400 error when trying to search the catalog:
https://demo.moqui.org/qapps/PopcAdmin/Catalog/Search?orderByField=-pseudoId&pageSize=20&queryString=*
Apparently, the service
org.moqui.search.SearchServices.search#DataDocuments
does not take into account fields that have a keyword subfield to allow ordering.The only place where
.keyword
is appended is here, in moqui-framework, but it seems it's not used by the search service.