All Products
Search
Document Center

OpenSearch:Default display fields

Last Updated:Apr 01, 2026

You can configure default display fields to specify the fields in the application schema that need to be retrieved and returned for each search request. Use the fetch_fields parameter to specify only the fields your application needs to display.

How it works

Two configuration layers control which fields are returned:

LayerWhen it applies
Console defaultNo fetch_fields value is passed in the request
SDK/API fetch_fieldsA value is passed at query time — overrides the console default

Set default display fields in the console

  1. Log on to the OpenSearch console. In the left-side navigation pane, choose Feature Extensions > Search Result Display.

  2. In the Default Display Fields section, add the fields to return.

    image

If you have not set a console default yet, you can also add display fields during a search test for an application.

Note: Separate multiple field values with semicolons (;).
image

Override display fields at query time

Passing fetch_fields in an SDK call or API request overrides the console default for that request. Specify only the fields your client needs — the size of returned text data has a significant impact on search performance.

API parameters: See Initiate search requests for how to use the fetch_fields parameter in API calls.

SDK for Java: The following example specifies the fields to return.

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

Limits

JOIN multi-table scenarios: Primary key fields in secondary tables cannot be set as default display fields. To include secondary table primary key values in search results, use the associated fields in the primary table instead.

imageimageimageimage