change the the name to indices boost
This commit is contained in:
parent
929bb3f2be
commit
c30d790609
|
@ -191,7 +191,7 @@ public class SearchSourceBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indexBoost != null) {
|
if (indexBoost != null) {
|
||||||
builder.startObject("queryBoost");
|
builder.startObject("indicesBoost");
|
||||||
for (TObjectFloatIterator<String> it = indexBoost.iterator(); it.hasNext();) {
|
for (TObjectFloatIterator<String> it = indexBoost.iterator(); it.hasNext();) {
|
||||||
it.advance();
|
it.advance();
|
||||||
builder.field(it.key(), it.value());
|
builder.field(it.key(), it.value());
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.elasticsearch.search.internal.SearchContext;
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* {
|
* {
|
||||||
* queryBoost : {
|
* indicesBoost : {
|
||||||
* "index1" : 1.4,
|
* "index1" : 1.4,
|
||||||
* "index2" : 1.5
|
* "index2" : 1.5
|
||||||
* }
|
* }
|
||||||
|
@ -36,7 +36,7 @@ import org.elasticsearch.search.internal.SearchContext;
|
||||||
*
|
*
|
||||||
* @author kimchy (shay.banon)
|
* @author kimchy (shay.banon)
|
||||||
*/
|
*/
|
||||||
public class QueryBoostParseElement implements SearchParseElement {
|
public class IndicesBoostParseElement implements SearchParseElement {
|
||||||
|
|
||||||
@Override public void parse(JsonParser jp, SearchContext context) throws Exception {
|
@Override public void parse(JsonParser jp, SearchContext context) throws Exception {
|
||||||
JsonToken token;
|
JsonToken token;
|
|
@ -46,7 +46,7 @@ public class QueryPhase implements SearchPhase {
|
||||||
ImmutableMap.Builder<String, SearchParseElement> parseElements = ImmutableMap.builder();
|
ImmutableMap.Builder<String, SearchParseElement> parseElements = ImmutableMap.builder();
|
||||||
parseElements.put("from", new FromParseElement()).put("size", new SizeParseElement())
|
parseElements.put("from", new FromParseElement()).put("size", new SizeParseElement())
|
||||||
.put("queryParserName", new QueryParserNameParseElement())
|
.put("queryParserName", new QueryParserNameParseElement())
|
||||||
.put("queryBoost", new QueryBoostParseElement())
|
.put("indicesBoost", new IndicesBoostParseElement())
|
||||||
.put("query", new QueryParseElement())
|
.put("query", new QueryParseElement())
|
||||||
.put("sort", new SortParseElement())
|
.put("sort", new SortParseElement())
|
||||||
.putAll(facetsPhase.parseElements());
|
.putAll(facetsPhase.parseElements());
|
||||||
|
|
Loading…
Reference in New Issue