Default display fields let you specify a fixed set of fields to return for every search request, giving you control over the response payload and search performance. You can also override this default per request using the fetch_fields parameter in the API or SDK.
How it works
Two mechanisms control which fields are returned in search results:
| Mechanism | Scope | Behavior |
|---|---|---|
| Console default | All requests | Fields configured in the OpenSearch console are returned for every search request unless overridden at request time. |
| Request-level override | Single request | Pass fetch_fields in the API or SDK to specify fields for a specific request. This overrides the console default for that request only. |
Returning fewer fields reduces response payload size and improves search performance. Specify only the fields your application needs.
Configure default display fields in the console
Log on to the OpenSearch console. In the left-side navigation pane, click OpenSearch Industry Algorithm Edition and select OpenSearch High-performance Search Edition, then choose Feature Extensions > Search Result Display.
On the Search Result Display page, select your application from the drop-down list, then add the fields you want to return by default in the Default Display Fields section.

If no default display fields are configured, use the
fetch_fieldsparameter to specify fields when running a search test in the OpenSearch console. Separate multiple fields with semicolons (;).
Configure fields to return via the API or SDK
Use the fetch_fields parameter to specify which fields to return. Setting fetch_fields at request time overwrites the default display fields configured in the console.
API: Pass
fetch_fieldsin your search request. For more information, see Initiate search requests.SDK: The following example shows how to specify return fields using the Java SDK.
// Specify the fields in the application that need to be returned in the search results. config.setFetchFields(Lists.newArrayList("id","name","phone","int_arr","literal_arr","float_arr","cate_id"));
Field return behavior
| Condition | Fields returned |
|---|---|
fetch_fields not set via API or SDK | Default display fields configured in the console |
fetch_fields set via API or SDK | Fields specified by fetch_fields; console default is ignored for that request |