diff --git a/docs/reference/migration/migrate_1_0.asciidoc b/docs/reference/migration/migrate_1_0.asciidoc index cbac9dea4d5..0cc10ae06bd 100644 --- a/docs/reference/migration/migrate_1_0.asciidoc +++ b/docs/reference/migration/migrate_1_0.asciidoc @@ -360,3 +360,5 @@ in the query string. * The `path` parameter in mappings has been deprecated. Use the <> parameter instead. +* The `custom_score` and `custom_boost_score` is no longer supported. You can + use <> instead. diff --git a/docs/reference/search/request/sort.asciidoc b/docs/reference/search/request/sort.asciidoc index a32261d4ce4..fa3d5919546 100644 --- a/docs/reference/search/request/sort.asciidoc +++ b/docs/reference/search/request/sort.asciidoc @@ -287,7 +287,7 @@ Allow to sort based on custom scripts, here is an example: -------------------------------------------------- Note, it is recommended, for single custom based script based sorting, -to use `custom_score` query instead as sorting based on score is faster. +to use `function_score` query instead as sorting based on score is faster. ==== Track Scores diff --git a/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java b/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java index 18e76cb9ed9..1dc0edf7ccd 100644 --- a/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java +++ b/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java @@ -1355,18 +1355,6 @@ public class SimpleIndexQueryParserTests extends ElasticsearchTestCase { assertThat(((TermFilter) constantScoreQuery.getFilter()).getTerm(), equalTo(new Term("name.last", "banon"))); } - // Disabled since we need a current context to execute it... -// @Test public void testCustomScoreQuery1() throws IOException { -// IndexQueryParser queryParser = queryParser(); -// String query = copyToStringFromClasspath("/org/elasticsearch/index/query/custom_score1.json"); -// Query parsedQuery = queryParser.parse(query).query(); -// assertThat(parsedQuery, instanceOf(FunctionScoreQuery.class)); -// FunctionScoreQuery functionScoreQuery = (FunctionScoreQuery) parsedQuery; -// assertThat(((TermQuery) functionScoreQuery.getSubQuery()).getTerm(), equalTo(new Term("name.last", "banon"))); -// assertThat(functionScoreQuery.getFunction(), instanceOf(CustomScoreQueryParser.ScriptScoreFunction.class)); -// } - - @Test public void testCustomBoostFactorQueryBuilder_withFunctionScore() throws IOException { IndexQueryParserService queryParser = queryParser();