Elasticsearch how to prevent duplicate data?

Hi all,

I need to prevent documents to be inserted into single index if it has the same data

EX:

{
    "_score":1.0,
    "_source":{
        "value":{
            "user":"test user",
            "age":"20"
        }
}

I need top prevent any documents has the same user and age into the same index

You should compute a fingerprint based on content and use this fingerprint as the document id.

3 Likes

Have a look at these blog posts:

2 Likes

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