# Вопрос по дубликатам

**URL:** https://discuss.elastic.co/t/topic/319889
**Category:** Вопросы на русском языке
**Created:** [November 27, 2022, 6:30pm UTC](https://discuss.elastic.co/t/topic/319889 "2022-11-27T18:30:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jenya87](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenya87/32/54012_2.png) [@Jenya87](https://discuss.elastic.co/u/Jenya87)
#### Post date: [November 27, 2022, 6:30pm UTC](https://discuss.elastic.co/t/topic/319889/1 "2022-11-27T18:30:19Z")

</div>

Доброго времени суток. Пытаюсь отчистить индекс от дубликатов, используя fingerprint (id в индексе нет), чтобы наполнить другой индекс чистыми данными:  
Конфиг logstash такой:

```auto
input {
  elasticsearch {
     hosts => ["https://xxx.xxx.xxx.xxx"]
     index => "index1"
     user=>"user"
     password=>"password"
     cacert=>"path to cert"
  }
}

filter {
    fingerprint {
        method => "SHA256"
        source => ["field1", "field2", "field3"]
        target => "[@metadata][generated_id]"
    }
}

output {

    elasticsearch {
         hosts => ["https://xxx.xxx.xxx.xxx"]
         index => "index2"
         user=>"user"
         password=>"password"
         cacert=>"path to cert"
         document_id => "%{[@metadata][generated_id]}"
    }
}

```

Но logstash выдаёт unexpected java error..Logstash версии 7.6, ES версии 8.5

Прошу помочь

---

<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: [December 25, 2022, 6:31pm UTC](https://discuss.elastic.co/t/topic/319889/2 "2022-12-25T18:31:20Z")

</div>

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