From 5ecea5388a085fa88c5c59f3b034813e856b5558 Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 7 Jul 2026 14:25:39 +0300 Subject: [PATCH 1/3] use prefix for filtering instead of currentOwner field --- src/common/indexer/elastic/elastic.indexer.helper.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/indexer/elastic/elastic.indexer.helper.ts b/src/common/indexer/elastic/elastic.indexer.helper.ts index 6923cddc0..6cfc8b949 100644 --- a/src/common/indexer/elastic/elastic.indexer.helper.ts +++ b/src/common/indexer/elastic/elastic.indexer.helper.ts @@ -710,9 +710,9 @@ export class ElasticIndexerHelper { if (filter.isSmartContract !== undefined) { if (filter.isSmartContract) { - elasticQuery = elasticQuery.withMustExistCondition('currentOwner'); + elasticQuery = this.buildAccountTypeFilter(elasticQuery, AccountType.SMART_CONTRACT); } else { - elasticQuery = elasticQuery.withMustNotExistCondition('currentOwner'); + elasticQuery = this.buildAccountTypeFilter(elasticQuery, AccountType.WALLET); } } @@ -737,7 +737,7 @@ export class ElasticIndexerHelper { } if (filter.addresses !== undefined && filter.addresses.length > 0) { - elasticQuery = elasticQuery.withMustMultiShouldCondition(filter.addresses, address => QueryType.Match('address', address)); + elasticQuery = elasticQuery.withMustMultiShouldCondition(filter.addresses, address => QueryType.Match('address.keyword', address)); } if (filter.search) { From db34e7cb94d6a9ed570169f89867cc0e6c61738b Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 7 Jul 2026 14:30:52 +0300 Subject: [PATCH 2/3] fix --- src/common/indexer/elastic/elastic.indexer.helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/indexer/elastic/elastic.indexer.helper.ts b/src/common/indexer/elastic/elastic.indexer.helper.ts index 6cfc8b949..a33dfd0be 100644 --- a/src/common/indexer/elastic/elastic.indexer.helper.ts +++ b/src/common/indexer/elastic/elastic.indexer.helper.ts @@ -737,7 +737,7 @@ export class ElasticIndexerHelper { } if (filter.addresses !== undefined && filter.addresses.length > 0) { - elasticQuery = elasticQuery.withMustMultiShouldCondition(filter.addresses, address => QueryType.Match('address.keyword', address)); + elasticQuery = elasticQuery.withMustMultiShouldCondition(filter.addresses, address => QueryType.Match('address', address)); } if (filter.search) { From 25cc0e4d02d5fb6f200b23962c7b70c6798b767e Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 7 Jul 2026 14:39:39 +0300 Subject: [PATCH 3/3] clean code --- src/common/indexer/elastic/elastic.indexer.helper.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/common/indexer/elastic/elastic.indexer.helper.ts b/src/common/indexer/elastic/elastic.indexer.helper.ts index a33dfd0be..ab926deb1 100644 --- a/src/common/indexer/elastic/elastic.indexer.helper.ts +++ b/src/common/indexer/elastic/elastic.indexer.helper.ts @@ -709,11 +709,7 @@ export class ElasticIndexerHelper { } if (filter.isSmartContract !== undefined) { - if (filter.isSmartContract) { - elasticQuery = this.buildAccountTypeFilter(elasticQuery, AccountType.SMART_CONTRACT); - } else { - elasticQuery = this.buildAccountTypeFilter(elasticQuery, AccountType.WALLET); - } + elasticQuery = this.buildAccountTypeFilter(elasticQuery, filter.isSmartContract ? AccountType.SMART_CONTRACT : AccountType.WALLET); } if (filter.name) {