Typo in error message with too few points for geo polygon filter.

Closes #8767
This commit is contained in:
John Michael Luy 2014-12-04 00:16:02 +08:00 committed by Clinton Gormley
parent b8687163c4
commit 27724bef6a
1 changed files with 2 additions and 2 deletions

View File

@ -124,14 +124,14 @@ public class GeoPolygonFilterParser implements FilterParser {
throw new QueryParsingException(parseContext.index(), "no points defined for geo_polygon filter");
} else {
if (shell.size() < 3) {
throw new QueryParsingException(parseContext.index(), "to few points defined for geo_polygon filter");
throw new QueryParsingException(parseContext.index(), "too few points defined for geo_polygon filter");
}
GeoPoint start = shell.get(0);
if (!start.equals(shell.get(shell.size() - 1))) {
shell.add(start);
}
if (shell.size() < 4) {
throw new QueryParsingException(parseContext.index(), "to few points defined for geo_polygon filter");
throw new QueryParsingException(parseContext.index(), "too few points defined for geo_polygon filter");
}
}