From a0cf1e569694f72edf2316623099ea4c27f10fd4 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 16 Dec 2014 21:43:22 +0100 Subject: [PATCH] Prepare removal of BaseIndex from IssueIndex --- .../org/sonar/server/issue/index/IssueIndex.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java index a01f0f9eeae..dcb1c35b8f3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -136,9 +136,8 @@ public class IssueIndex extends BaseIndex { QueryContext queryContext = new QueryContext().setPage(1, 0); SearchRequestBuilder esSearch = getClient() - .prepareSearch(this.getIndexName()) - .setTypes(this.getIndexType()) - .setIndices(this.getIndexName()); + .prepareSearch(IssueIndexDefinition.INDEX) + .setTypes(IssueIndexDefinition.TYPE_ISSUE); QueryBuilder esQuery = QueryBuilders.matchAllQuery(); BoolFilterBuilder esFilter = getFilter(query, queryContext); @@ -166,9 +165,8 @@ public class IssueIndex extends BaseIndex { public Result search(IssueQuery query, QueryContext options) { SearchRequestBuilder esSearch = getClient() - .prepareSearch(this.getIndexName()) - .setTypes(this.getIndexType()) - .setIndices(this.getIndexName()); + .prepareSearch(IssueIndexDefinition.INDEX) + .setTypes(IssueIndexDefinition.TYPE_ISSUE); if (options.isScroll()) { esSearch.setSearchType(SearchType.SCAN); @@ -217,7 +215,7 @@ public class IssueIndex extends BaseIndex { FilterBuilders.andFilter(projectFilter, dateFilter) ); - getClient().prepareDeleteByQuery(getIndexName()).setQuery(queryBuilder).get(); + getClient().prepareDeleteByQuery(IssueIndexDefinition.INDEX).setQuery(queryBuilder).get(); } /* Build main filter (match based) */ -- 2.39.5