mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-12 07:02:10 +00:00
DATAES-216 - cleanup
This commit is contained in:
parent
ba1fb9fc6f
commit
428cac3642
@ -864,7 +864,7 @@ public class ElasticsearchTemplate implements ElasticsearchOperations, Applicati
|
||||
}
|
||||
}
|
||||
|
||||
if (searchQuery.getIndicesBoost() != null) {
|
||||
if (CollectionUtils.isNotEmpty(searchQuery.getIndicesBoost())) {
|
||||
for (IndexBoost indexBoost : searchQuery.getIndicesBoost()) {
|
||||
searchRequest.addIndexBoost(indexBoost.getIndexName(), indexBoost.getBoost());
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class NativeSearchQuery extends AbstractQuery implements SearchQuery {
|
||||
private List<FacetRequest> facets;
|
||||
private List<AbstractAggregationBuilder> aggregations;
|
||||
private HighlightBuilder.Field[] highlightFields;
|
||||
private IndexBoost[] indicesBoost;
|
||||
private List<IndexBoost> indicesBoost;
|
||||
|
||||
|
||||
public NativeSearchQuery(QueryBuilder query) {
|
||||
@ -132,11 +132,11 @@ public class NativeSearchQuery extends AbstractQuery implements SearchQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndexBoost[] getIndicesBoost() {
|
||||
public List<IndexBoost> getIndicesBoost() {
|
||||
return indicesBoost;
|
||||
}
|
||||
|
||||
public void setIndicesBoost(IndexBoost... indicesBoost) {
|
||||
public void setIndicesBoost(List<IndexBoost> indicesBoost) {
|
||||
this.indicesBoost = indicesBoost;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class NativeSearchQueryBuilder {
|
||||
private String[] indices;
|
||||
private String[] types;
|
||||
private String[] fields;
|
||||
private IndexBoost[] indicesBoost;
|
||||
private List<IndexBoost> indicesBoost;
|
||||
private float minScore;
|
||||
private Collection<String> ids;
|
||||
private String route;
|
||||
@ -91,7 +91,7 @@ public class NativeSearchQueryBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public NativeSearchQueryBuilder withIndicesBoost(IndexBoost... indicesBoost) {
|
||||
public NativeSearchQueryBuilder withIndicesBoost(List<IndexBoost> indicesBoost) {
|
||||
this.indicesBoost = indicesBoost;
|
||||
return this;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public interface SearchQuery extends Query {
|
||||
|
||||
HighlightBuilder.Field[] getHighlightFields();
|
||||
|
||||
IndexBoost[] getIndicesBoost();
|
||||
List<IndexBoost> getIndicesBoost();
|
||||
|
||||
List<ScriptField> getScriptFields();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user