public RangeQueryBuilder relation(String relation) { if (relation == null) { throw new IllegalArgumentException("relation cannot be null"); } this.relation = ShapeRelation.getRelationByName(relation); if (this.relation == null) { throw new IllegalArgumentException(relation + " is not a valid relation"); } if (!isRelationAllowed(this.relation)) { throw new IllegalArgumentException("[range] query does not support relation [" + relation + "]"); } return this; }
/** * Read from a stream. */ public RangeQueryBuilder(StreamInput in) throws IOException { super(in); fieldName = in.readString(); from = in.readGenericValue(); to = in.readGenericValue(); includeLower = in.readBoolean(); includeUpper = in.readBoolean(); timeZone = in.readOptionalTimeZone(); String formatString = in.readOptionalString(); if (formatString != null) { format = DateFormatter.forPattern(formatString); } if (in.getVersion().onOrAfter(Version.V_5_2_0)) { String relationString = in.readOptionalString(); if (relationString != null) { relation = ShapeRelation.getRelationByName(relationString); if (relation != null && !isRelationAllowed(relation)) { throw new IllegalArgumentException( "[range] query does not support relation [" + relationString + "]"); } } } }
public RangeQueryBuilder relation(String relation) { if (relation == null) { throw new IllegalArgumentException("relation cannot be null"); } this.relation = ShapeRelation.getRelationByName(relation); if (this.relation == null) { throw new IllegalArgumentException(relation + " is not a valid relation"); } return this; }
public RangeQueryBuilder relation(String relation) { if (relation == null) { throw new IllegalArgumentException("relation cannot be null"); } this.relation = ShapeRelation.getRelationByName(relation); if (this.relation == null) { throw new IllegalArgumentException(relation + " is not a valid relation"); } if (!isRelationAllowed(this.relation)) { throw new IllegalArgumentException("[range] query does not support relation [" + relation + "]"); } return this; }
public RangeQueryBuilder relation(String relation) { if (relation == null) { throw new IllegalArgumentException("relation cannot be null"); } this.relation = ShapeRelation.getRelationByName(relation); if (this.relation == null) { throw new IllegalArgumentException(relation + " is not a valid relation"); } if (!isRelationAllowed(this.relation)) { throw new IllegalArgumentException("[range] query does not support relation [" + relation + "]"); } return this; }
for (String propertyName : propertyNames) { ShapeBuilder shapeBuilder = getShapeBuilder(value); ShapeRelation relation = ShapeRelation.getRelationByName(compare.getCompareName()); filters.add(new GeoShapeQueryBuilder(propertyName, shapeBuilder) .ignoreUnmapped(true)
for (String propertyName : propertyNames) { ShapeBuilder shapeBuilder = getShapeBuilder(value); ShapeRelation relation = ShapeRelation.getRelationByName(compare.getCompareName()); filters.add(new GeoShapeQueryBuilder(propertyName, shapeBuilder) .ignoreUnmapped(true)
shapeRelation = ShapeRelation.getRelationByName(parser.text()); if (shapeRelation == null) { throw new ParsingException(parser.getTokenLocation(), "Unknown shape operation [" + parser.text() + " ]");
/** * Read from a stream. */ public RangeQueryBuilder(StreamInput in) throws IOException { super(in); fieldName = in.readString(); from = in.readGenericValue(); to = in.readGenericValue(); includeLower = in.readBoolean(); includeUpper = in.readBoolean(); timeZone = in.readOptionalTimeZone(); String formatString = in.readOptionalString(); if (formatString != null) { format = Joda.forPattern(formatString); } if (in.getVersion().onOrAfter(Version.V_5_2_0)) { String relationString = in.readOptionalString(); if (relationString != null) { relation = ShapeRelation.getRelationByName(relationString); if (relation != null && !isRelationAllowed(relation)) { throw new IllegalArgumentException( "[range] query does not support relation [" + relationString + "]"); } } } }
/** * Read from a stream. */ public RangeQueryBuilder(StreamInput in) throws IOException { super(in); fieldName = in.readString(); from = in.readGenericValue(); to = in.readGenericValue(); includeLower = in.readBoolean(); includeUpper = in.readBoolean(); timeZone = in.readOptionalTimeZone(); String formatString = in.readOptionalString(); if (formatString != null) { format = Joda.forPattern(formatString); } if (in.getVersion().onOrAfter(Version.V_5_2_0)) { String relationString = in.readOptionalString(); if (relationString != null) { relation = ShapeRelation.getRelationByName(relationString); if (relation != null && !isRelationAllowed(relation)) { throw new IllegalArgumentException( "[range] query does not support relation [" + relationString + "]"); } } } }
/** * Read from a stream. */ public RangeQueryBuilder(StreamInput in) throws IOException { super(in); fieldName = in.readString(); from = in.readGenericValue(); to = in.readGenericValue(); includeLower = in.readBoolean(); includeUpper = in.readBoolean(); timeZone = in.readOptionalTimeZone(); String formatString = in.readOptionalString(); if (formatString != null) { format = Joda.forPattern(formatString); } if (in.getVersion().onOrAfter(Version.V_5_2_0)) { String relationString = in.readOptionalString(); if (relationString != null) { relation = ShapeRelation.getRelationByName(relationString); } } }
strategyName = parser.text(); } else if ("relation".equals(currentFieldName)) { shapeRelation = ShapeRelation.getRelationByName(parser.text()); if (shapeRelation == null) { throw new QueryParsingException(parseContext, "Unknown shape operation [" + parser.text() + " ]");
shapeRelation = ShapeRelation.getRelationByName(parser.text()); if (shapeRelation == null) { throw new ParsingException(parser.getTokenLocation(), "Unknown shape operation [" + parser.text() + " ]");
shapeRelation = ShapeRelation.getRelationByName(parser.text()); if (shapeRelation == null) { throw new ParsingException(parser.getTokenLocation(), "Unknown shape operation [" + parser.text() + " ]");
shapeRelation = ShapeRelation.getRelationByName(parser.text()); if (shapeRelation == null) { throw new ParsingException(parser.getTokenLocation(), "Unknown shape operation [" + parser.text() + " ]");