diff --git a/src/storage/elasticsearch/elasticsearch.ts b/src/storage/elasticsearch/elasticsearch.ts index 0450b9ab..1188b7f2 100644 --- a/src/storage/elasticsearch/elasticsearch.ts +++ b/src/storage/elasticsearch/elasticsearch.ts @@ -234,7 +234,7 @@ export class Elasticsearch implements Database { size: 1, }); - if (searchResponse.body.hits.total > 1) { + if (searchResponse.body.hits.total > 0) { return { exists: true, object: searchResponse.body.hits.hits[0],