change scope to _score

This commit is contained in:
kimchy 2010-12-27 19:19:17 +02:00
parent d73a459f1e
commit a84e0a49b7
6 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ public class HasChildFilterBuilder extends BaseFilterBuilder {
queryBuilder.toXContent(builder, params); queryBuilder.toXContent(builder, params);
builder.field("type", childType); builder.field("type", childType);
if (scope != null) { if (scope != null) {
builder.field("scope", scope); builder.field("_scope", scope);
} }
if (filterName != null) { if (filterName != null) {
builder.field("_name", filterName); builder.field("_name", filterName);

View File

@ -71,7 +71,7 @@ public class HasChildFilterParser extends AbstractIndexComponent implements XCon
} else if (token.isValue()) { } else if (token.isValue()) {
if ("type".equals(currentFieldName)) { if ("type".equals(currentFieldName)) {
childType = parser.text(); childType = parser.text();
} else if ("scope".equals(currentFieldName)) { } else if ("_scope".equals(currentFieldName)) {
scope = parser.text(); scope = parser.text();
} else if ("_name".equals(currentFieldName)) { } else if ("_name".equals(currentFieldName)) {
filterName = parser.text(); filterName = parser.text();

View File

@ -65,7 +65,7 @@ public class HasChildQueryBuilder extends BaseQueryBuilder {
queryBuilder.toXContent(builder, params); queryBuilder.toXContent(builder, params);
builder.field("type", childType); builder.field("type", childType);
if (scope != null) { if (scope != null) {
builder.field("scope", scope); builder.field("_scope", scope);
} }
if (boost != 1.0f) { if (boost != 1.0f) {
builder.field("boost", boost); builder.field("boost", boost);

View File

@ -71,7 +71,7 @@ public class HasChildQueryParser extends AbstractIndexComponent implements XCont
} else if (token.isValue()) { } else if (token.isValue()) {
if ("type".equals(currentFieldName)) { if ("type".equals(currentFieldName)) {
childType = parser.text(); childType = parser.text();
} else if ("scope".equals(currentFieldName)) { } else if ("_scope".equals(currentFieldName)) {
scope = parser.text(); scope = parser.text();
} }
} }

View File

@ -97,7 +97,7 @@ public class TopChildrenQueryBuilder extends BaseQueryBuilder {
queryBuilder.toXContent(builder, params); queryBuilder.toXContent(builder, params);
builder.field("type", childType); builder.field("type", childType);
if (scope != null) { if (scope != null) {
builder.field("scope", scope); builder.field("_scope", scope);
} }
if (score != null) { if (score != null) {
builder.field("score", score); builder.field("score", score);

View File

@ -72,7 +72,7 @@ public class TopChildrenQueryParser extends AbstractIndexComponent implements XC
} else if (token.isValue()) { } else if (token.isValue()) {
if ("type".equals(currentFieldName)) { if ("type".equals(currentFieldName)) {
childType = parser.text(); childType = parser.text();
} else if ("scope".equals(currentFieldName)) { } else if ("_scope".equals(currentFieldName)) {
scope = parser.text(); scope = parser.text();
} else if ("score".equals(currentFieldName)) { } else if ("score".equals(currentFieldName)) {
scoreType = TopChildrenQuery.ScoreType.fromString(parser.text()); scoreType = TopChildrenQuery.ScoreType.fromString(parser.text());