From 65dd57a73bec515dd673c3d987e5e242e7a3bf4e Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 23 May 2020 16:31:29 +0200 Subject: [PATCH] Implemented filtering remittees for which IBAN or BIC isn't set (which are both needed for auto completing remittee's IBAN and BIC) --- .../net/dankito/banking/search/LuceneRemitteeSearcher.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/search/LuceneRemitteeSearcher.kt b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/search/LuceneRemitteeSearcher.kt index 9c960bf2..a52d6a14 100644 --- a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/search/LuceneRemitteeSearcher.kt +++ b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/search/LuceneRemitteeSearcher.kt @@ -37,7 +37,9 @@ open class LuceneRemitteeSearcher(indexFolder: File) : IRemitteeSearcher { ) } - return searcher.searchAndMap(MappedSearchConfig(luceneQuery, Remittee::class.java, properties)).toSet().toList() + return searcher.searchAndMap(MappedSearchConfig(luceneQuery, Remittee::class.java, properties)) + .toSet() // don't display same Remittee multiple times + .filterNot { it.iban.isNullOrBlank() || it.bic.isNullOrBlank() } // e.g. comdirect doesn't supply other party's IBAN and BIC -> filter these as they have no value for auto-entering a remittee's IBAN and BIC } } \ No newline at end of file