# Enrich processor time range

**URL:** https://discuss.elastic.co/t/enrich-processor-time-range/316070
**Category:** Elasticsearch
**Created:** [October 7, 2022, 12:36pm UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070 "2022-10-07T12:36:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Marcin\_Frankiewicz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_frankiewicz/32/97650_2.png) [@Marcin\_Frankiewicz](https://discuss.elastic.co/u/Marcin_Frankiewicz)
#### Post date: [October 7, 2022, 12:36pm UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070/1 "2022-10-07T12:36:05Z")

</div>

Hi,

i have a pipeline with enrich processor.

When enriching is called.. what time range is used for enrich?  
All documents in index(defined in enrich policy) will be scanned? or maybe from last 15minutes?

Elasticsearch 7.17

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [October 7, 2022, 2:59pm UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070/2 "2022-10-07T14:59:45Z")

</div>

The lookup is performed I simply comparing the `match_field` to the field that's passed in the enrich processor. Basically an exact match time is not considered.

Typically the enrich / look up data is not time-based.

What are you trying to accomplish?

---

<div class="post-metadata">

### Author: ![Marcin\_Frankiewicz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_frankiewicz/32/97650_2.png) [@Marcin\_Frankiewicz](https://discuss.elastic.co/u/Marcin_Frankiewicz)
#### Post date: [October 11, 2022, 2:49pm UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070/3 "2022-10-11T14:49:12Z")

</div>

I'm trying to proof, that while max\_matches = 1, then enriched data can be random.

Example :

```auto
POST /test-users/_doc
{
  "@timestamp": "2022-10-10T18:40:00.000+02:00",
  "id": "1",
  "name": "John",
  "surname": "Derre"
}

POST /test-users/_doc
{
  "@timestamp": "2022-10-10T18:45:00.000+02:00",
  "id": "2",
  "name": "Michael",
  "surname": "Frank"
}

POST /test-mails/_doc
{
  "@timestamp": "2022-10-10T18:45:00.000+02:00",
  "id": "1",
  "email": "test2@test.com",
  "real": "true"
}

POST /test-mails/_doc
{
  "@timestamp": "2022-10-10T18:45:00.000+02:00",
  "id": "2",
  "email": "test3@test.com",
  "real": "true"
}

```

Does user with id=1 will have random email?

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [October 11, 2022, 9:27pm UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070/4 "2022-10-11T21:27:34Z")

</div>

> [@Marcin\_Frankiewicz](#):
>
> I'm trying to proff

Apologies I am not clear what you mean.

So if that data above is the Lookup Data with duplicate `id`s ... then yes I would consider the match random but you can also return up to 128 Matches so you could get both and look for the latest.

Or fix your enrich data to only have the latest.

Oh and Welcome to the Community!

---

<div class="post-metadata">

### Author: ![Marcin\_Frankiewicz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_frankiewicz/32/97650_2.png) [@Marcin\_Frankiewicz](https://discuss.elastic.co/u/Marcin_Frankiewicz)
#### Post date: [October 12, 2022, 11:02am UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070/5 "2022-10-12T11:02:51Z")

</div>

Thank you for explain 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 9, 2022, 11:03am UTC](https://discuss.elastic.co/t/enrich-processor-time-range/316070/6 "2022-11-09T11:03:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
