return-query Option Output Format Change
- Last Updated: April 14, 2026
- 1 minute read
- MarkLogic Server
- Version 11.0
- Documentation
This change only affects users of the REST, Java, and Node.js Client APIs who use the return-query query option and generate a search response summary in JSON.
In prior versions of MarkLogic, the return-query query option returned a serialized JSON structured query in the query property of the search response in JSON, but a serialized cts:query in an XML search response. As of MarkLogic 9.0-5, return-query always generates a serialized cts:query. The serialized JSON representation can be passed to cts:query or cts.query to reconstruct an in-memory query object on MarkLogic, just as you can with the XML serialization.
This change will not affect you if you do not use a JSON search response, do not use return-query, or do not have code that depends on the serialization produced by return-query.