You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2019/12/05 15:31:34 UTC

[unomi] branch UNOMI-225-es7-fix-counts updated: UNOMI-225 ElasticSearch 7 fix for changes in the total hits Remove commented out code

This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-225-es7-fix-counts
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/UNOMI-225-es7-fix-counts by this push:
     new f76c082  UNOMI-225 ElasticSearch 7 fix for changes in the total hits Remove commented out code
f76c082 is described below

commit f76c082c0deeae492673b1938e2fb6f9841c5e07
Author: Serge Huber <sh...@apache.org>
AuthorDate: Thu Dec 5 16:31:27 2019 +0100

    UNOMI-225 ElasticSearch 7 fix for changes in the total hits
    Remove commented out code
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 .../elasticsearch/ElasticSearchPersistenceServiceImpl.java     | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index 87f8afb..812c184 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -25,7 +25,6 @@ import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.CredentialsProvider;
 import org.apache.http.conn.ssl.NoopHostnameVerifier;
 import org.apache.http.impl.client.BasicCredentialsProvider;
-import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
 import org.apache.lucene.search.TotalHits;
 import org.apache.unomi.api.Item;
 import org.apache.unomi.api.PartialList;
@@ -1356,15 +1355,6 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
                 countRequest.source(searchSourceBuilder);
                 CountResponse response = client.count(countRequest, RequestOptions.DEFAULT);
                 return response.getCount();
-                /*
-                SearchRequest searchRequest = new SearchRequest(getIndexNameForQuery(itemType));
-                SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
-                searchSourceBuilder.query(filter);
-                searchSourceBuilder.size(0);
-                searchRequest.source(searchSourceBuilder);
-                SearchResponse response = client.search(searchRequest, RequestOptions.DEFAULT);
-                return response.getHits().getTotalHits().value;
-                 */
             }
         }.catchingExecuteInClassLoader(true);
     }