diff --git a/src/main/java/org/codelibs/fess/helper/IndexingHelper.java b/src/main/java/org/codelibs/fess/helper/IndexingHelper.java index 1d3f19347..419c2df19 100644 --- a/src/main/java/org/codelibs/fess/helper/IndexingHelper.java +++ b/src/main/java/org/codelibs/fess/helper/IndexingHelper.java @@ -121,8 +121,7 @@ private void deleteOldDocuments(final SearchEngineClient searchEngineClient, fin } if (!docIdList.isEmpty()) { searchEngineClient.deleteByQuery(fessConfig.getIndexDocumentUpdateIndex(), - QueryBuilders.idsQuery().addIds(docIdList.stream().toArray(n -> new String[n]))); - + QueryBuilders.termsQuery(fessConfig.getIndexFieldDocId(), docIdList.stream().toArray(n -> new String[n]))); } } @@ -145,7 +144,7 @@ public long deleteDocumentByUrl(final SearchEngineClient searchEngineClient, fin public long deleteDocumentsByDocId(final SearchEngineClient searchEngineClient, final List docIdList) { final FessConfig fessConfig = ComponentUtil.getFessConfig(); return searchEngineClient.deleteByQuery(fessConfig.getIndexDocumentUpdateIndex(), - QueryBuilders.idsQuery().addIds(docIdList.stream().toArray(n -> new String[n]))); + QueryBuilders.termsQuery(fessConfig.getIndexFieldDocId(), docIdList.stream().toArray(n -> new String[n]))); } public long deleteDocumentByQuery(final SearchEngineClient searchEngineClient, final QueryBuilder queryBuilder) {