Skip to content

Commit

Permalink
Fix index name in bitmap filtering docs (#9032)
Browse files Browse the repository at this point in the history
* Fix index name in bitmap filtering docs

Signed-off-by: Russ Cam <russ@searchpioneer.com>
Signed-off-by: Russ Cam <russ.cam@forloop.co.uk>

* Apply changes from code review

Add forward slashes to URLs

Signed-off-by: Russ Cam <russ@searchpioneer.com>
Signed-off-by: Russ Cam <russ.cam@forloop.co.uk>

* Apply suggestions from code review

Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: Russ Cam <russ.cam@forloop.co.uk>

---------

Signed-off-by: Russ Cam <russ@searchpioneer.com>
Signed-off-by: Russ Cam <russ.cam@forloop.co.uk>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Fanit Kolchina <kolchfa@amazon.com>
  • Loading branch information
3 people authored Feb 17, 2025
1 parent dd9a4a4 commit c2ba686
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions _query-dsl/term/terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ Parameter | Data type | Description
**Introduced 2.17**
{: .label .label-purple }

The `terms` query can filter for multiple terms simultaneously. However, when the number of terms in the input filter increases to a large value (around 10,000), the resulting network and memory overhead can become significant, making the query inefficient. In such cases, consider encoding your large terms filter using a [roaring bitmap](https://github.com/RoaringBitmap/RoaringBitmap) for more efficient filtering.
The `terms` query can filter for multiple terms simultaneously. However, when the number of terms in the input filter increases to a large value (around 10,000), the resulting network and memory overhead can become significant, making the query inefficient. In such cases, consider encoding your large terms filter using a [roaring bitmap](https://github.com/RoaringBitmap/RoaringBitmap) for more efficient filtering.

The following example assumes that you have two indexes: a `products` index, which contains all the products sold by a company, and a `customers` index, which stores filters representing customers who own specific products.
The following example assumes that you have two indexes: a `products` index, which contains all the products sold by a company, and a `customers` index, which stores filters representing customers who own specific products.

First, create a `products` index and map `product_id` as a `keyword`:

Expand All @@ -277,7 +277,7 @@ PUT /products
Next, index three documents that correspond to products:

```json
PUT students/_doc/1
PUT /products/_doc/1
{
"name": "Product 1",
"product_id" : "111"
Expand All @@ -286,7 +286,7 @@ PUT students/_doc/1
{% include copy-curl.html %}

```json
PUT students/_doc/2
PUT /products/_doc/2
{
"name": "Product 2",
"product_id" : "222"
Expand All @@ -295,7 +295,7 @@ PUT students/_doc/2
{% include copy-curl.html %}

```json
PUT students/_doc/3
PUT /products/_doc/3
{
"name": "Product 3",
"product_id" : "333"
Expand Down

0 comments on commit c2ba686

Please sign in to comment.