Summary queries

更新时间:
复制 MD 格式

OpenSearch High-performance Search Edition does not support summary queries. To retrieve field values as summary content in search results, configure an attribute field based on the field type.

Workaround by field type

Non-TEXT and non-SHORT_TEXT fields

Set the field as an attribute field. The attribute field reads the field's initial values directly from the table, which you can use as summary content in your application.

TEXT and SHORT_TEXT fields

Attribute fields are not directly supported on TEXT or SHORT_TEXT fields. Use the following approach instead:

  1. Add a new field of the LITERAL type.

  2. Create a primary index on the original TEXT or SHORT_TEXT field.

  3. Set the new LITERAL field as an attribute field.

The LITERAL attribute field reads the original field's initial values directly from the table.