TermsLookup fields should be marked as Required in docs (#53784)

The terms-lookup section of our terms query docs currently state that the
index, id and path fields are optional. They should be marked instead
as required.
This commit is contained in:
Alan Woodward 2020-03-20 15:38:43 +00:00
parent adfeb50a53
commit a70016a6d6

View File

@ -22,7 +22,7 @@ GET /_search
"query" : {
"terms" : {
"user" : ["kimchy", "elasticsearch"],
"boost" : 1.0
"boost" : 1.0
}
}
}
@ -93,16 +93,16 @@ To perform a terms lookup, use the following parameters.
[[query-dsl-terms-lookup-params]]
====== Terms lookup parameters
`index`::
(Optional, string) Name of the index from which to fetch field values.
(Required, string) Name of the index from which to fetch field values.
`id`::
(Optional, string) <<mapping-id-field,ID>> of the document from which to fetch
(Required, string) <<mapping-id-field,ID>> of the document from which to fetch
field values.
`path`::
+
--
(Optional, string) Name of the field from which to fetch field values. {es} uses
(Required, string) Name of the field from which to fetch field values. {es} uses
these values as search terms for the query.
If the field values include an array of nested inner objects, you can access
@ -117,7 +117,7 @@ when the document was indexed, this parameter is required.
[[query-dsl-terms-lookup-example]]
====== Terms lookup example
To see how terms lookup works, try the following example.
To see how terms lookup works, try the following example.
. Create an index with a `keyword` field named `color`.
+
@ -246,4 +246,4 @@ field, {es} returns both documents.
}
----
// TESTRESPONSE[s/"took" : 17/"took" : $body.took/]
--
--