From c4d71eb1eb1c2c1b06f4b6a5c2f714a0dd39eb2f Mon Sep 17 00:00:00 2001 From: alicejw Date: Fri, 6 May 2022 14:26:43 -0700 Subject: [PATCH 01/11] for TLQ changes that align with other PR #483 https://github.com/opensearch-project/documentation-website/pull/483 Signed-off-by: alicejw --- _opensearch/query-dsl/full-text.md | 2 +- _opensearch/query-dsl/index.md | 33 ++++++++++++++++++++++---- _opensearch/query-dsl/term.md | 37 +++++++++++------------------- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/_opensearch/query-dsl/full-text.md b/_opensearch/query-dsl/full-text.md index e21efaa1..5ddcb39f 100644 --- a/_opensearch/query-dsl/full-text.md +++ b/_opensearch/query-dsl/full-text.md @@ -7,7 +7,7 @@ nav_order: 40 # Full-text queries -This page lists all full-text query types and common options. Given the sheer number of options and subtle behaviors, the best method of ensuring useful search results is to test different queries against representative indices and verify the output. +This page lists all full-text query types and common options. There are many options for full-text queries, each with its own subtle behavior difference, so the best method to ensure that you obtain useful search results is to test different queries against representative indexes and verify the outputs individually. --- diff --git a/_opensearch/query-dsl/index.md b/_opensearch/query-dsl/index.md index f3167f52..14959694 100644 --- a/_opensearch/query-dsl/index.md +++ b/_opensearch/query-dsl/index.md @@ -12,9 +12,31 @@ redirect_from: # Query DSL -While you can use HTTP request parameters to perform simple searches, you can also use the OpenSearch query domain-specific language (DSL), which provides a wider range of search options. The query DSL uses the HTTP request body, so you can more easily customize your queries to get the exact results that you want. +OpenSearch provides a query domain-specific language (DSL) that you can use to search with more options than a simple search via HTTP request parameter alone. The query DSL uses the HTTP request body, so you can more easily customize your queries to get the exact results that you want. -For example, the following request performs a simple search to search for a `speaker` field that has a value of `queen`. +The OpenSearch query DSL provides three query options: term-level queries, full-text queries, and boolean queries. You can even perform more complicated searches by using different elements from each variety to find whatever data you need. + +## DSL Query Types + +OpenSearch supports two types of queries when you search for data: term-level queries and full-text queries. + +The following table describes the differences between them: + +| | Term-level queries | Full-text queries +:--- | :--- | :--- +*Description* | Term-level queries answer which documents match a query. | Full-text queries answer how well the documents match a query. +*Analyzer* | The search term isn't analyzed. This means that the term query searches for your search term as it is. | The search term is analyzed by the same analyzer that was used for the specific field of the document at the time it was indexed. This means that your search term goes through the same analysis process that the document's field did. +*Relevance* | Term-level queries simply return documents that match without sorting them based on the relevance score. They still calculate the relevance score, but this score is the same for all the documents that are returned. | Full-text queries calculate a relevance score for each match and sort the results by decreasing order of relevance. +*Use Case* | Use term-level queries when you want to match exact values such as numbers, dates, tags, and so on, and don't need the matches to be sorted by relevance. | Use full-text queries to match text fields and sort by relevance after taking into account factors like casing and stemming variants. + +OpenSearch uses a probabilistic ranking framework called Okapi BM25 to calculate relevance scores. To learn more about Okapi BM25, see [Wikipedia](https://en.wikipedia.org/wiki/Okapi_BM25). +{: .note } + +To show the difference between a simple HTTP search versus a search via query DSL, we have an example of each one so that you can see how they differ. + +## Example: HTTP simple search + +The following request performs a simple search to search for a `speaker` field that has a value of `queen`. **Sample request** ```json @@ -55,7 +77,9 @@ GET _search?q=speaker:queen } ``` -With query DSL, however, you can include an HTTP request body to look for results more tailored to your needs. The following example shows how to search for `speaker` and `text_entry` fields that have a value of `QUEEN`. +## Example: Query DSL search + +With a query DSL search, you can include an HTTP request body to look for results more tailored to your needs. The following example shows how to search for `speaker` and `text_entry` fields that have a value of `QUEEN`. **Sample request** ```json @@ -118,5 +142,4 @@ With query DSL, however, you can include an HTTP request body to look for result ] } } -``` -The OpenSearch query DSL comes in three varieties: term-level queries, full-text queries, and boolean queries. You can even perform more complicated searches by using different elements from each variety to find whatever data you need. +``` \ No newline at end of file diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index d4a836d4..5b8eee75 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -2,25 +2,11 @@ layout: default title: Term-level queries parent: Query DSL -nav_order: 30 +nav_order: 32 --- # Term-level queries -OpenSearch supports two types of queries when you search for data: term-level queries and full-text queries. - -The following table describes the differences between them: - -| | Term-level queries | Full-text queries -:--- | :--- | :--- -*Description* | Term-level queries answer which documents match a query. | Full-text queries answer how well the documents match a query. -*Analyzer* | The search term isn't analyzed. This means that the term query searches for your search term as it is. | The search term is analyzed by the same analyzer that was used for the specific field of the document at the time it was indexed. This means that your search term goes through the same analysis process that the document's field did. -*Relevance* | Term-level queries simply return documents that match without sorting them based on the relevance score. They still calculate the relevance score, but this score is the same for all the documents that are returned. | Full-text queries calculate a relevance score for each match and sort the results by decreasing order of relevance. -*Use Case* | Use term-level queries when you want to match exact values such as numbers, dates, tags, and so on, and don't need the matches to be sorted by relevance. | Use full-text queries to match text fields and sort by relevance after taking into account factors like casing and stemming variants. - -OpenSearch uses a probabilistic ranking framework called Okapi BM25 to calculate relevance scores. To learn more about Okapi BM25, see [Wikipedia](https://en.wikipedia.org/wiki/Okapi_BM25). -{: .note } - Assume that you have the complete works of Shakespeare indexed in an OpenSearch cluster. We use a term-level query to search for the phrase "To be, or not to be" in the `text_entry` field: ```json @@ -228,7 +214,12 @@ The search query “HAMLET” is also searched literally. So, to get a match on --- -## Term +## Term-level query operations + +This section provides examples for term-level query operations that you can use for specific search use cases. + + +## Single term Use the `term` query to search for an exact term in a field. @@ -245,7 +236,7 @@ GET shakespeare/_search } ``` -## Terms +## Multiple terms Use the `terms` query to search for multiple terms in the same field. @@ -265,7 +256,7 @@ GET shakespeare/_search You get back documents that match any of the terms. -## IDs +## Document IDs Use the `ids` query to search for one or more document ID values. @@ -283,7 +274,7 @@ GET shakespeare/_search } ``` -## Range +## Range of values Use the `range` query to search for a range of values in a field. @@ -364,7 +355,7 @@ GET products/_search The keyword `now` refers to the current date and time. -## Prefix +## Multiple terms by prefix Use the `prefix` query to search for terms that begin with a specific prefix. @@ -379,7 +370,7 @@ GET shakespeare/_search } ``` -## Exists +## All instances of a specific field in a document Use the `exists` query to search for documents that contain a specific field. @@ -394,7 +385,7 @@ GET shakespeare/_search } ``` -## Wildcards +## Wildcard patterns Use wildcard queries to search for terms that match a wildcard pattern. @@ -422,7 +413,7 @@ If we change `*` to `?`, we get no matches, because `?` refers to a single chara Wildcard queries tend to be slow because they need to iterate over a lot of terms. Avoid placing wildcard characters at the beginning of a query because it could be a very expensive operation in terms of both resources and time. -## Regex +## Regular expressions (Regex) Use the `regexp` query to search for terms that match a regular expression. From 6b0b9b5275542166630fda84680d6f29089e09cf Mon Sep 17 00:00:00 2001 From: alicejw Date: Fri, 6 May 2022 14:55:06 -0700 Subject: [PATCH 02/11] fix unnecessary nav order change. was remnant of previously added new page that is not needed now Signed-off-by: alicejw --- _opensearch/query-dsl/term.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index 5b8eee75..689dcbb9 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -2,7 +2,7 @@ layout: default title: Term-level queries parent: Query DSL -nav_order: 32 +nav_order: 30 --- # Term-level queries From fff1f03c4d43485964a978eedff9a308860711da Mon Sep 17 00:00:00 2001 From: alicejw Date: Fri, 6 May 2022 15:09:37 -0700 Subject: [PATCH 03/11] add column title to query type table Signed-off-by: alicejw --- _opensearch/query-dsl/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_opensearch/query-dsl/index.md b/_opensearch/query-dsl/index.md index 14959694..610d7f67 100644 --- a/_opensearch/query-dsl/index.md +++ b/_opensearch/query-dsl/index.md @@ -22,9 +22,9 @@ OpenSearch supports two types of queries when you search for data: term-level qu The following table describes the differences between them: -| | Term-level queries | Full-text queries +| Metrics | Term-level queries | Full-text queries :--- | :--- | :--- -*Description* | Term-level queries answer which documents match a query. | Full-text queries answer how well the documents match a query. +*Query results* | Term-level queries answer which documents match a query. | Full-text queries answer how well the documents match a query. *Analyzer* | The search term isn't analyzed. This means that the term query searches for your search term as it is. | The search term is analyzed by the same analyzer that was used for the specific field of the document at the time it was indexed. This means that your search term goes through the same analysis process that the document's field did. *Relevance* | Term-level queries simply return documents that match without sorting them based on the relevance score. They still calculate the relevance score, but this score is the same for all the documents that are returned. | Full-text queries calculate a relevance score for each match and sort the results by decreasing order of relevance. *Use Case* | Use term-level queries when you want to match exact values such as numbers, dates, tags, and so on, and don't need the matches to be sorted by relevance. | Use full-text queries to match text fields and sort by relevance after taking into account factors like casing and stemming variants. From 2d5062d85bf48e93210f81e759d277f9024bcb15 Mon Sep 17 00:00:00 2001 From: alicejw Date: Fri, 6 May 2022 15:39:01 -0700 Subject: [PATCH 04/11] disambiguate use of TLQ acronym applied incorrectly to because it represents instead. Signed-off-by: alicejw --- .../access-control/document-level-security.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_security-plugin/access-control/document-level-security.md b/_security-plugin/access-control/document-level-security.md index 210c2d29..6d062d03 100644 --- a/_security-plugin/access-control/document-level-security.md +++ b/_security-plugin/access-control/document-level-security.md @@ -124,11 +124,11 @@ PUT _plugins/_security/api/roles/abac }] } ``` -## Use term-level lookup queries (TLQs) with DLS +## Use term-level lookup queries with DLS -You can perform term-level lookup queries (TLQs) with document-level security (DLS) using either of two modes: adaptive or filter level. The default mode is adaptive, where OpenSearch automatically switches between Lucene-level or filter-level mode depending on whether or not there is a TLQ. DLS queries without TLQs are executed in Lucene-level mode, whereas DLS queries with TLQs are executed in filter-level mode. +You can perform term-level queries with document-level security (DLS) using either of two modes: adaptive or filter level. The default mode is adaptive, where OpenSearch automatically switches between Lucene-level or filter-level mode depending on whether or not there is a term-level query. DLS queries that do not contain a term-level query are executed in Lucene-level mode, whereas DLS queries with term-level queries are executed in filter-level mode. -By default, the security plugin detects if a DLS query contains a TLQ or not and chooses the appropriate mode automatically at runtime. +By default, the security plugin detects if a DLS query contains a term-level query or not and chooses the appropriate mode automatically at runtime. To learn more about OpenSearch queries, see [Term-level queries](https://opensearch.org/docs/latest/opensearch/query-dsl/term/). @@ -144,6 +144,6 @@ plugins.security.dls.mode: filter-level | Evaluation mode | Parameter | Description | Usage | :--- | :--- | :--- | :--- | -Lucene-level DLS | `lucene-level` | This setting makes all DLS queries apply to the Lucene level. | Lucene-level DLS modifies Lucene queries and data structures directly. This is the most efficient mode but does not allow certain advanced constructs in DLS queries, including TLQs. +Lucene-level DLS | `lucene-level` | This setting makes all DLS queries apply to the Lucene level. | Lucene-level DLS modifies Lucene queries and data structures directly. This is the most efficient mode but does not allow certain advanced constructs in DLS queries, including term-level queries. Filter-level DLS | `filter-level` | This setting makes all DLS queries apply to the filter level. | In this mode, OpenSearch applies DLS by modifying queries that OpenSearch receives. This allows for term-level lookup queries in DLS queries, but you can only use the `get`, `search`, `mget`, and `msearch` operations to retrieve data from the protected index. Additionally, cross-cluster searches are limited with this mode. -Adaptive | `adaptive-level` | The default setting that allows OpenSearch to automatically choose the mode. | DLS queries without TLQs are executed in Lucene-level mode, while DLS queries that contain TLQ are executed in filter- level mode. +Adaptive | `adaptive-level` | The default setting that allows OpenSearch to automatically choose the mode. | DLS queries without term-level queries are executed in Lucene-level mode, while DLS queries that contain a term-level query are executed in filter-level mode. From 3d1087ed60c51a91a8acb4c7c59059be91629fcc Mon Sep 17 00:00:00 2001 From: alicejw Date: Fri, 6 May 2022 15:48:06 -0700 Subject: [PATCH 05/11] i found out that the original term was correct here, it is a term lookup query, not the generic so changing it back. Signed-off-by: alicejw --- _security-plugin/access-control/document-level-security.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_security-plugin/access-control/document-level-security.md b/_security-plugin/access-control/document-level-security.md index 6d062d03..22204983 100644 --- a/_security-plugin/access-control/document-level-security.md +++ b/_security-plugin/access-control/document-level-security.md @@ -124,11 +124,11 @@ PUT _plugins/_security/api/roles/abac }] } ``` -## Use term-level lookup queries with DLS +## Use term lookup queries (TLQs) with DLS -You can perform term-level queries with document-level security (DLS) using either of two modes: adaptive or filter level. The default mode is adaptive, where OpenSearch automatically switches between Lucene-level or filter-level mode depending on whether or not there is a term-level query. DLS queries that do not contain a term-level query are executed in Lucene-level mode, whereas DLS queries with term-level queries are executed in filter-level mode. +You can perform term lookup queries (TLQs) with document-level security (DLS) using either of two modes: adaptive or filter level. The default mode is adaptive, where OpenSearch automatically switches between Lucene-level or filter-level mode depending on whether or not there is a TLQ. DLS queries that do not contain a TLQ are executed in Lucene-level mode, whereas DLS queries with TLQs are executed in filter-level mode. -By default, the security plugin detects if a DLS query contains a term-level query or not and chooses the appropriate mode automatically at runtime. +By default, the security plugin detects if a DLS query contains a TLQ or not and chooses the appropriate mode automatically at runtime. To learn more about OpenSearch queries, see [Term-level queries](https://opensearch.org/docs/latest/opensearch/query-dsl/term/). From e473df4cce60f3492eaca47621f355b41a57a30c Mon Sep 17 00:00:00 2001 From: alicejw Date: Fri, 6 May 2022 15:50:26 -0700 Subject: [PATCH 06/11] found more instances of to change to for Signed-off-by: alicejw --- _security-plugin/access-control/document-level-security.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_security-plugin/access-control/document-level-security.md b/_security-plugin/access-control/document-level-security.md index 22204983..33920bce 100644 --- a/_security-plugin/access-control/document-level-security.md +++ b/_security-plugin/access-control/document-level-security.md @@ -144,6 +144,6 @@ plugins.security.dls.mode: filter-level | Evaluation mode | Parameter | Description | Usage | :--- | :--- | :--- | :--- | -Lucene-level DLS | `lucene-level` | This setting makes all DLS queries apply to the Lucene level. | Lucene-level DLS modifies Lucene queries and data structures directly. This is the most efficient mode but does not allow certain advanced constructs in DLS queries, including term-level queries. -Filter-level DLS | `filter-level` | This setting makes all DLS queries apply to the filter level. | In this mode, OpenSearch applies DLS by modifying queries that OpenSearch receives. This allows for term-level lookup queries in DLS queries, but you can only use the `get`, `search`, `mget`, and `msearch` operations to retrieve data from the protected index. Additionally, cross-cluster searches are limited with this mode. -Adaptive | `adaptive-level` | The default setting that allows OpenSearch to automatically choose the mode. | DLS queries without term-level queries are executed in Lucene-level mode, while DLS queries that contain a term-level query are executed in filter-level mode. +Lucene-level DLS | `lucene-level` | This setting makes all DLS queries apply to the Lucene level. | Lucene-level DLS modifies Lucene queries and data structures directly. This is the most efficient mode but does not allow certain advanced constructs in DLS queries, including TLQs. +Filter-level DLS | `filter-level` | This setting makes all DLS queries apply to the filter level. | In this mode, OpenSearch applies DLS by modifying queries that OpenSearch receives. This allows for TLQs in DLS queries, but you can only use the `get`, `search`, `mget`, and `msearch` operations to retrieve data from the protected index. Additionally, cross-cluster searches are limited with this mode. +Adaptive | `adaptive-level` | The default setting that allows OpenSearch to automatically choose the mode. | DLS queries without TLQs are executed in Lucene-level mode, while DLS queries that contain a TLQ are executed in filter-level mode. From 8a1605e7e1ba404ee4ac16d7e95f27a2e562641c Mon Sep 17 00:00:00 2001 From: alicejw Date: Mon, 9 May 2022 10:21:34 -0700 Subject: [PATCH 07/11] add a sample response to a terms query Signed-off-by: alicejw --- _opensearch/query-dsl/term.md | 63 +++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index 7bfb90b5..09ad9d17 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -238,7 +238,7 @@ GET shakespeare/_search ## Multiple terms -Use the `terms` query to search for multiple terms in the same field. +Use the `terms` operation to search for multiple values for same query field. ```json GET shakespeare/_search @@ -255,16 +255,67 @@ GET shakespeare/_search ``` You get back documents that match any of the terms. +#### Sample response -### Terms Lookup +```json +{ + "took" : 11, + "timed_out" : false, + "_shards" : { + "total" : 1, + "successful" : 1, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 2, + "relation" : "eq" + }, + "max_score" : 1.0, + "hits" : [ + { + "_index" : "shakespeare", + "_id" : "61808", + "_score" : 1.0, + "_source" : { + "type" : "line", + "line_id" : 61809, + "play_name" : "Merchant of Venice", + "speech_number" : 33, + "line_number" : "1.3.115", + "speaker" : "SHYLOCK", + "text_entry" : "Go to, then; you come to me, and you say" + } + }, + { + "_index" : "shakespeare", + "_id" : "61809", + "_score" : 1.0, + "_source" : { + "type" : "line", + "line_id" : 61810, + "play_name" : "Merchant of Venice", + "speech_number" : 33, + "line_number" : "1.3.116", + "speaker" : "SHYLOCK", + "text_entry" : "Shylock, we would have moneys: you say so;" + } + } + ] + } +} +``` -You can use a `terms` query with a `lookup` to match values based on a field in a document in another index. +### Terms lookup query (TQL) + +Use a terms lookup query (TQL) to retrieve multiple field values in a specific document within a specific index. Use the `terms` operation, and specify the index name, document Id and specify the term you want to look up with the `path` parameter. Parameter | Behavior :--- | :--- -`index` | The index from which the document is read. -`id` | The id of the documented. -`path` | Path to the field from which the values are used in the terms query. +`index` | The index name that contains the document that you want search. +`id` | Specifies the exact document to query for terms. +`path` | Specifies the field name for the query. E.g. to get all lines from the shakespeare play for a role (or roles) specified in the index `play-assignments` for the entry `42`: From 9564a2cd455f1c22a843eda0b247088bc7cf7187 Mon Sep 17 00:00:00 2001 From: alicejw Date: Mon, 9 May 2022 10:23:28 -0700 Subject: [PATCH 08/11] descriptions to clarify how to use the terms lookup query Signed-off-by: alicejw --- _opensearch/query-dsl/term.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index 09ad9d17..19711b7a 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -309,7 +309,7 @@ You get back documents that match any of the terms. ### Terms lookup query (TQL) -Use a terms lookup query (TQL) to retrieve multiple field values in a specific document within a specific index. Use the `terms` operation, and specify the index name, document Id and specify the term you want to look up with the `path` parameter. +Use a terms lookup query (TQL) to retrieve multiple field values in a specific document within a specific index. Use the `terms` operation, and specify the index name, document Id and specify the field you want to look up with the `path` parameter. Parameter | Behavior :--- | :--- From 87e8c5d83da55b3ef962f28d8d0467ddc8ba5881 Mon Sep 17 00:00:00 2001 From: alicejw Date: Mon, 9 May 2022 10:33:52 -0700 Subject: [PATCH 09/11] for typo in acronmym for TLQ Signed-off-by: alicejw --- _opensearch/query-dsl/term.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index 19711b7a..38c9c022 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -307,9 +307,9 @@ You get back documents that match any of the terms. } ``` -### Terms lookup query (TQL) +### Terms lookup query (TLQ) -Use a terms lookup query (TQL) to retrieve multiple field values in a specific document within a specific index. Use the `terms` operation, and specify the index name, document Id and specify the field you want to look up with the `path` parameter. +Use a terms lookup query (TLQ) to retrieve multiple field values in a specific document within a specific index. Use the `terms` operation, and specify the index name, document Id and specify the field you want to look up with the `path` parameter. Parameter | Behavior :--- | :--- From 01e505b864568113cbafb1ece5ec0c8c2b5e74e1 Mon Sep 17 00:00:00 2001 From: alicejw Date: Mon, 9 May 2022 10:41:20 -0700 Subject: [PATCH 10/11] for typo Signed-off-by: alicejw --- _opensearch/query-dsl/term.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index 38c9c022..d3e87ee1 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -317,7 +317,7 @@ Parameter | Behavior `id` | Specifies the exact document to query for terms. `path` | Specifies the field name for the query. -E.g. to get all lines from the shakespeare play for a role (or roles) specified in the index `play-assignments` for the entry `42`: +To get all the lines from a Shakespeare play for a role (or roles) specified in the index `play-assignments` for the document `42`: ```json GET shakespeare/_search From 6f4c75d023a602e0c7b6a5a3b04804997f7a782c Mon Sep 17 00:00:00 2001 From: alicejw Date: Mon, 9 May 2022 10:47:34 -0700 Subject: [PATCH 11/11] for heading to match other level 2s Signed-off-by: alicejw --- _opensearch/query-dsl/term.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/query-dsl/term.md b/_opensearch/query-dsl/term.md index d3e87ee1..2bc206b9 100644 --- a/_opensearch/query-dsl/term.md +++ b/_opensearch/query-dsl/term.md @@ -307,7 +307,7 @@ You get back documents that match any of the terms. } ``` -### Terms lookup query (TLQ) +## Terms lookup query (TLQ) Use a terms lookup query (TLQ) to retrieve multiple field values in a specific document within a specific index. Use the `terms` operation, and specify the index name, document Id and specify the field you want to look up with the `path` parameter.