All Products
Search
Document Center

:Formats of query results

Last Updated:Aug 27, 2024

Supported formats

OpenSearch Vector Search Edition can return query results in XML format and JSON format. Query results in XML format are highly readable. The system requires long periods of time to format query results in XML. You can use this format when you troubleshoot issues. Query results in JSON format are also highly readable. The system requires a shorter period of time to format a query result in JSON format than the period of time to format the same query result in XML format. By default, OpenSearch Vector Search Edition SDK uses the JSON format. Query results in Protobuf format are unreadable. Data in ProtoBuf format requires low bandwidth and can be deserialized in an efficient manner. You can use this format when high performance is required.

Specify a format

You can include the format parameter in the config clause to specify the XML format or JSON format as the result format. By default, query results are returned in XML format. For example, the following config clause specifies that the query result is returned in JSON format:

config=cluster:cluster1,format:json&&query=phrase:"Mobile"