IndexQueryParserService queryParser = queryParser();
String query = copyToStringFromClasspath("/org/elasticsearch/index/query/query-fields-match.json");
Query parsedQuery = queryParser.parse(query).query();
assertThat(parsedQuery, instanceOf(BooleanQuery.class));
BooleanQuery bQuery = (BooleanQuery) parsedQuery;
assertThat(bQuery.clauses().size(), equalTo(2));
assertEquals(Sets.newHashSet(new Term("name.first", "test"), new Term("name.last", "test")),
Sets.newHashSet(assertBooleanSubQuery(parsedQuery, TermQuery.class, 0).getTerm(),
assertBooleanSubQuery(parsedQuery, TermQuery.class, 1).getTerm()));
}