-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 6.0
-
Component/s: Automation
-
Tags:
When invoking the Document.PageProvider operation on a provider with aggregates support (ex: default_search) JsonDocumentListWriter fails to write
the aggregates.
For instance:
curl -u Administrator:Administrator -H 'Content-Type: application/json+nxrequest' -d '{"params":{"providerName":"default_search","namedParameters":{"param":"value"}}}' http://127.0.0.1:8080/nuxeo/site/automation/Document.PageProvider
produces:
org.codehaus.jackson.map.JsonMappingException: (was java.lang.UnsupportedOperationException) (through reference chain: java.util.HashMap["dc_created_agg"]->org.nuxeo.elasticsearch.aggregate.DateHistogramAggregate["searchDocument"]->org.nuxeo.ecm.core.api.impl.SimpleDocumentModel["id"]) .... at org.codehaus.jackson.JsonGenerator.writeObjectField(JsonGenerator.java:1089) at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonDocumentListWriter.writeDocuments(JsonDocumentListWriter.java:194)