本文整理了Java中org.elasticsearch.search.builder.SearchSourceBuilder.indexBoost()
方法的一些代码示例,展示了SearchSourceBuilder.indexBoost()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchSourceBuilder.indexBoost()
方法的具体详情如下:
包路径:org.elasticsearch.search.builder.SearchSourceBuilder
类名称:SearchSourceBuilder
方法名:indexBoost
[英]Sets the boost a specific index or alias will receive when the query is executed against it.
[中]设置对特定索引或别名执行查询时将收到的提升。
代码示例来源:origin: spring-projects/spring-data-elasticsearch
searchRequest.source().indexBoost(indexBoost.getIndexName(), indexBoost.getBoost());
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Sets the boost a specific index will receive when the query is executed against it.
*
* @param index The index to apply the boost against
* @param indexBoost The boost to apply to the index
*/
public SearchRequestBuilder addIndexBoost(String index, float indexBoost) {
sourceBuilder().indexBoost(index, indexBoost);
return this;
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
/**
* Sets the boost a specific index will receive when the query is executed against it.
*
* @param index The index to apply the boost against
* @param indexBoost The boost to apply to the index
*/
public SearchRequestBuilder addIndexBoost(String index, float indexBoost) {
sourceBuilder().indexBoost(index, indexBoost);
return this;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Sets the boost a specific index will receive when the query is executed against it.
*
* @param index The index to apply the boost against
* @param indexBoost The boost to apply to the index
*/
public SearchRequestBuilder addIndexBoost(String index, float indexBoost) {
sourceBuilder().indexBoost(index, indexBoost);
return this;
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Sets the boost a specific index will receive when the query is executed against it.
*
* @param index The index to apply the boost against
* @param indexBoost The boost to apply to the index
*/
public SearchRequestBuilder addIndexBoost(String index, float indexBoost) {
sourceBuilder().indexBoost(index, indexBoost);
return this;
}
代码示例来源:origin: harbby/presto-connectors
/**
* Sets the boost a specific index will receive when the query is executeed against it.
*
* @param index The index to apply the boost against
* @param indexBoost The boost to apply to the index
*/
public SearchRequestBuilder addIndexBoost(String index, float indexBoost) {
sourceBuilder().indexBoost(index, indexBoost);
return this;
}
代码示例来源:origin: javanna/elasticshell
public SearchRequestBuilder<JsonInput, JsonOutput> indexBoost(String index, float indexBoost) {
sourceBuilder().indexBoost(index, indexBoost);
return this;
}
代码示例来源:origin: VanRoy/spring-data-jest
searchSourceBuilder.indexBoost(indexBoost.getIndexName(), indexBoost.getBoost());
代码示例来源:origin: medcl/elasticsearch-carrot2
String sBoost = indexBoost.substring(divisor + 1);
try {
searchSourceBuilder.indexBoost(indexName, Float.parseFloat(sBoost));
} catch (NumberFormatException e) {
throw new ElasticSearchIllegalArgumentException("Illegal index boost [" + indexBoost + "], boost not a float number");
代码示例来源:origin: com.strapdata.elasticsearch.test/framework
int indexBoostSize = randomIntBetween(1, 10);
for (int i = 0; i < indexBoostSize; i++) {
builder.indexBoost(randomAlphaOfLengthBetween(5, 20), randomFloat() * 10);
内容来源于网络,如有侵权,请联系作者删除!