private String parseFiltersAndFunctions(QueryParseContext parseContext, XContentParser parser,
ArrayList<FiltersFunctionScoreQuery.FilterFunction> filterFunctions, String currentFieldName) throws IOException {
XContentParser.Token token;
while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {
Filter filter = null;
ScoreFunction scoreFunction = null;
Float functionWeight = null;
if (token != XContentParser.Token.START_OBJECT) {
throw new QueryParsingException(parseContext.index(), NAME + ": malformed query, expected a "
+ XContentParser.Token.START_OBJECT + " while parsing functions but got a " + token);
} else {