[Docs] Remove `custom_score` from documentation and add a migration
section.
This commit is contained in:
parent
006075f01e
commit
990ce658a4
|
@ -360,3 +360,5 @@ in the query string.
|
|||
* The `path` parameter in mappings has been deprecated. Use the
|
||||
<<copy-to,`copy_to`>> parameter instead.
|
||||
|
||||
* The `custom_score` and `custom_boost_score` is no longer supported. You can
|
||||
use <<query-dsl-function-score-query,`function_score`>> instead.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue