james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [james-project] 03/08: JAMES-2767 Downgrading mailbox quota search ES to 6.3.2 client
Date Wed, 05 Jun 2019 10:09:30 GMT
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit fdc008da827a306da4596c3b61090d19ac3554d3
Author: Rene Cordier <rcordier@linagora.com>
AuthorDate: Tue Jun 4 13:44:42 2019 +0700

    JAMES-2767 Downgrading mailbox quota search ES to 6.3.2 client
---
 .../james/quota/search/elasticsearch/ElasticSearchQuotaSearcher.java | 5 ++---
 .../elasticsearch/events/ElasticSearchQuotaMailboxListenerTest.java  | 4 +---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/mailbox/plugin/quota-search-elasticsearch/src/main/java/org/apache/james/quota/search/elasticsearch/ElasticSearchQuotaSearcher.java
b/mailbox/plugin/quota-search-elasticsearch/src/main/java/org/apache/james/quota/search/elasticsearch/ElasticSearchQuotaSearcher.java
index 315b7ab..fd3cff7 100644
--- a/mailbox/plugin/quota-search-elasticsearch/src/main/java/org/apache/james/quota/search/elasticsearch/ElasticSearchQuotaSearcher.java
+++ b/mailbox/plugin/quota-search-elasticsearch/src/main/java/org/apache/james/quota/search/elasticsearch/ElasticSearchQuotaSearcher.java
@@ -34,7 +34,6 @@ import org.apache.james.core.User;
 import org.apache.james.quota.search.QuotaQuery;
 import org.apache.james.quota.search.QuotaSearcher;
 import org.elasticsearch.action.search.SearchRequest;
-import org.elasticsearch.client.RequestOptions;
 import org.elasticsearch.client.RestHighLevelClient;
 import org.elasticsearch.common.unit.TimeValue;
 import org.elasticsearch.search.SearchHit;
@@ -87,7 +86,7 @@ public class ElasticSearchQuotaSearcher implements QuotaSearcher {
             .types(NodeMappingFactory.DEFAULT_MAPPING_NAME)
             .source(searchSourceBuilder);
 
-        return Arrays.stream(client.search(searchRequest, RequestOptions.DEFAULT)
+        return Arrays.stream(client.search(searchRequest)
             .getHits()
             .getHits());
     }
@@ -97,7 +96,7 @@ public class ElasticSearchQuotaSearcher implements QuotaSearcher {
             new SearchRequest(readAlias.getValue())
                 .types(NodeMappingFactory.DEFAULT_MAPPING_NAME)
                 .source(searchSourceBuilder(query))
-            .scroll(TIMEOUT))
+                .scroll(TIMEOUT))
             .stream()
             .flatMap(searchResponse -> Arrays.stream(searchResponse.getHits().getHits()))
             .skip(query.getOffset().getValue());
diff --git a/mailbox/plugin/quota-search-elasticsearch/src/test/java/org/apache/james/quota/search/elasticsearch/events/ElasticSearchQuotaMailboxListenerTest.java
b/mailbox/plugin/quota-search-elasticsearch/src/test/java/org/apache/james/quota/search/elasticsearch/events/ElasticSearchQuotaMailboxListenerTest.java
index 92dc9f5..ef5ef59 100644
--- a/mailbox/plugin/quota-search-elasticsearch/src/test/java/org/apache/james/quota/search/elasticsearch/events/ElasticSearchQuotaMailboxListenerTest.java
+++ b/mailbox/plugin/quota-search-elasticsearch/src/test/java/org/apache/james/quota/search/elasticsearch/events/ElasticSearchQuotaMailboxListenerTest.java
@@ -40,7 +40,6 @@ import org.apache.james.quota.search.elasticsearch.QuotaSearchIndexCreationUtil;
 import org.apache.james.quota.search.elasticsearch.json.QuotaRatioToElasticSearchJson;
 import org.elasticsearch.action.search.SearchRequest;
 import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.client.RequestOptions;
 import org.elasticsearch.client.RestHighLevelClient;
 import org.elasticsearch.index.query.QueryBuilders;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
@@ -95,8 +94,7 @@ public class ElasticSearchQuotaMailboxListenerTest {
         SearchResponse searchResponse = client.search(new SearchRequest(QuotaRatioElasticSearchConstants.DEFAULT_QUOTA_RATIO_READ_ALIAS.getValue())
                 .types(NodeMappingFactory.DEFAULT_MAPPING_NAME)
                 .source(new SearchSourceBuilder()
-                    .query(QueryBuilders.matchAllQuery())),
-            RequestOptions.DEFAULT);
+                    .query(QueryBuilders.matchAllQuery())));
 
         assertThat(searchResponse.getHits().getTotalHits()).isEqualTo(1);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message