I'm using source filtering on a query to just return a small set of information and within that information I want the first photo url of an object:
"query" : { ... },
"_source" : ["name", "photos.thumbnail_url"]
Of course this returns the thumbnail_url for all of the photos stored against each item.
Is there any way to get just the first nested photo's thumbnail_url using source filtering?
(I appreciate that one way to do it would be to index the first photo separately and just source filter to include that separate field but I'm asking whether it is possible without a separate field.)
(I've guessed a few approaches without luck: photos.0.thumbnail_url, photos[0].thumbnail_url, photos.first.thumbnail_url)
size: 1?