New

The executive guide to generative AI

Read more
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Fields

edit

Quite often you don’t need to waste bandwidth by returning the complete object graph foreach hit.

Using

.Fields(p=>p.Id, p=>p.Name, p=>p.Followers.First().Name, /** etc */)

You can limit the returned fields for each hit.

An overload taking plain strings also exists.

Was this helpful?
Feedback