From 905a1993ba5fd6ded7b8cc954da0cb0711ff1420 Mon Sep 17 00:00:00 2001 From: Andrei Stefan Date: Tue, 2 Mar 2021 17:19:32 +0200 Subject: [PATCH] SQL: Adapt the limitations page to the new "fields" API usage (#69616) Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com> (cherry picked from commit bf1b7a36b5dd4bbc899ea981213dc8ecc546cbf0) --- docs/reference/sql/limitations.asciidoc | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/docs/reference/sql/limitations.asciidoc b/docs/reference/sql/limitations.asciidoc index b1baf9c3376bf..d9dd3b4bde871 100644 --- a/docs/reference/sql/limitations.asciidoc +++ b/docs/reference/sql/limitations.asciidoc @@ -196,22 +196,13 @@ indexed with some loss of precision from the original values (4.190951585769653E Therefore calling `ST_Z` function in the filtering, grouping or sorting will return `null`. [discrete] -[[fields-from-source]] -=== Retrieving from `_source` +[[using-fields-api]] +=== Retrieving using the `fields` search parameter -Most of {es-sql}'s columns are retrieved from the document's `_source` and there is no attempt to get the columns content from -`docvalue_fields` not even in the case <> field is disabled in the mapping explicitly. -If a column, for which there is no source stored, is asked for in a query, {es-sql} will not return it. Field types that don't follow -this restriction are: `keyword`, `date`, `scaled_float`, `geo_point`, `geo_shape` since they are NOT returned from `_source` but -from `docvalue_fields`. - -[discrete] -[[fields-from-docvalues]] -=== Retrieving from `docvalue_fields` - -When the number of columns retrievable from `docvalue_fields` is greater than the configured <> -the query will fail with `IllegalArgumentException: Trying to retrieve too many docvalue_fields` error. Either the mentioned {es} -setting needs to be adjusted or fewer columns retrievable from `docvalue_fields` need to be selected. +{es-sql} retrieves column values using the <>. Any limitations on the `fields` parameter also apply to +{es-sql} queries. For example, if `_source` is disabled +for any of the returned fields or at index level, the values cannot be retrieved. [discrete] [[aggs-in-pivot]]