public static class GeohashCellQuery.Builder extends AbstractQueryBuilder<GeohashCellQuery.Builder>
fieldname and
geohash to be set. the default for a neighbor filteing is
false.Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Paramsboost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryNameEMPTY_PARAMS| Constructor and Description |
|---|
Builder(StreamInput in)
Read from a stream.
|
Builder(java.lang.String field,
GeoPoint point) |
Builder(java.lang.String field,
java.lang.String geohash) |
Builder(java.lang.String field,
java.lang.String geohash,
boolean neighbors) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doEquals(GeohashCellQuery.Builder other)
Indicates whether some other
QueryBuilder object of the same type is "equal to" this one. |
protected int |
doHashCode() |
protected org.apache.lucene.search.Query |
doToQuery(QueryShardContext context) |
protected void |
doWriteTo(StreamOutput out) |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
fieldName() |
GeohashCellQuery.Builder |
fieldName(java.lang.String fieldName) |
static java.util.Optional<GeohashCellQuery.Builder> |
fromXContent(QueryParseContext parseContext) |
java.lang.String |
geohash() |
GeohashCellQuery.Builder |
geohash(java.lang.String geohash) |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
boolean |
ignoreUnmapped()
Gets whether the query builder will ignore unmapped fields (and run a
MatchNoDocsQuery in place of this query) or throw an
exception if the field is unmapped. |
GeohashCellQuery.Builder |
ignoreUnmapped(boolean ignoreUnmapped)
Sets whether the query builder should ignore unmapped fields (and run
a
MatchNoDocsQuery in place of this query) or throw an
exception if the field is unmapped. |
boolean |
neighbors() |
GeohashCellQuery.Builder |
neighbors(boolean neighbors) |
GeohashCellQuery.Builder |
point(double lat,
double lon) |
GeohashCellQuery.Builder |
point(GeoPoint point) |
java.lang.Integer |
precision() |
GeohashCellQuery.Builder |
precision(int levels) |
GeohashCellQuery.Builder |
precision(java.lang.String precision) |
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTobuildAsBytes, buildAsBytes, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitrewriteQuerypublic Builder(java.lang.String field,
GeoPoint point)
public Builder(java.lang.String field,
java.lang.String geohash)
public Builder(java.lang.String field,
java.lang.String geohash,
boolean neighbors)
public Builder(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractQueryBuilder<GeohashCellQuery.Builder>java.io.IOExceptionpublic GeohashCellQuery.Builder point(GeoPoint point)
public GeohashCellQuery.Builder point(double lat, double lon)
public GeohashCellQuery.Builder geohash(java.lang.String geohash)
public java.lang.String geohash()
public GeohashCellQuery.Builder precision(int levels)
public java.lang.Integer precision()
public GeohashCellQuery.Builder precision(java.lang.String precision)
public GeohashCellQuery.Builder neighbors(boolean neighbors)
public boolean neighbors()
public GeohashCellQuery.Builder fieldName(java.lang.String fieldName)
public java.lang.String fieldName()
public GeohashCellQuery.Builder ignoreUnmapped(boolean ignoreUnmapped)
MatchNoDocsQuery in place of this query) or throw an
exception if the field is unmapped.public boolean ignoreUnmapped()
MatchNoDocsQuery in place of this query) or throw an
exception if the field is unmapped.protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery in class AbstractQueryBuilder<GeohashCellQuery.Builder>java.io.IOExceptionprotected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent in class AbstractQueryBuilder<GeohashCellQuery.Builder>java.io.IOExceptionpublic static java.util.Optional<GeohashCellQuery.Builder> fromXContent(QueryParseContext parseContext) throws java.io.IOException
java.io.IOExceptionprotected boolean doEquals(GeohashCellQuery.Builder other)
AbstractQueryBuilderQueryBuilder object of the same type is "equal to" this one.doEquals in class AbstractQueryBuilder<GeohashCellQuery.Builder>protected int doHashCode()
doHashCode in class AbstractQueryBuilder<GeohashCellQuery.Builder>public java.lang.String getWriteableName()
NamedWriteable