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);
public Result<Issue> 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);
FilterBuilders.andFilter(projectFilter, dateFilter)
);
- getClient().prepareDeleteByQuery(getIndexName()).setQuery(queryBuilder).get();
+ getClient().prepareDeleteByQuery(IssueIndexDefinition.INDEX).setQuery(queryBuilder).get();
}
/* Build main filter (match based) */