|
@@ -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();
|