All Products
Search
Document Center

OpenSearch:Default display fields

Last Updated:Apr 01, 2026

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:

MechanismScopeBehavior
Console defaultAll requestsFields configured in the OpenSearch console are returned for every search request unless overridden at request time.
Request-level overrideSingle requestPass 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

  1. 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.

  2. 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.

    image

  3. If no default display fields are configured, use the fetch_fields parameter to specify fields when running a search test in the OpenSearch console. Separate multiple fields with semicolons (;).

    image

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_fields in 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

ConditionFields returned
fetch_fields not set via API or SDKDefault display fields configured in the console
fetch_fields set via API or SDKFields specified by fetch_fields; console default is ignored for that request