All Products
Search
Document Center

OpenSearch:Default display field

Last Updated:Jun 22, 2026

Default display fields control which fields from your application structure are returned in search results. You can configure them in the console or by using an SDK or API.

Console configuration

  1. In the console, go to Alibaba Cloud OpenSearch > Feature Extensions>Search Result Display, and then click Add Default Display Field.

  2. If you have not configured a default display field, you can still specify which fields to return during a search test in the console.

Note: When you set the fetch_fields parameter, use semicolons to separate the field names. In a search test in the console, set the fetch_fields query parameter to the fields you want to return (for example, fetch_fields = buy;cate_id;title). The search results will then include only the specified fields.

SDK and API configuration

fetch_fields: The volume of data returned in a response directly affects query performance. We recommend retrieving only the fields you need. If you specify this parameter in an SDK or API call, it overrides the default display fields configured in the console.

  • API parameter: Use the fetch_fields parameter. For more information, see search processing.

  • SDK configuration: The following example uses the Java SDK:

// Specify which fields to return in the search results.
config.setFetchFields(Lists.newArrayList("id","name","phone","int_arr","literal_arr","float_arr","cate_id"));

Usage notes

If you do not specify the fetch_fields parameter in an SDK or API call, the service returns the default display fields that are configured in the console. If you specify the fetch_fields parameter in the call, it overrides the console configuration.