public class GeoBoundingBoxQuery extends Object implements Query
场景举例:订单区域画像分析的场景,想分析A小区购买力,而恰好这A小区是矩形的。我们通过统计A小区订单数量(或总价)即可。
方法:在SearchQuery的中构造一个BoolQuery,其 mustQueries 中放入一个GeoBoundingBoxQuery的矩形地理位置,然后mustQueries再放入查询订单数量的query,就可以获得想要的结果。
| Modifier and Type | Class and Description |
|---|---|
static class |
GeoBoundingBoxQuery.Builder |
| Constructor and Description |
|---|
GeoBoundingBoxQuery() |
| Modifier and Type | Method and Description |
|---|---|
String |
getBottomRight() |
String |
getFieldName() |
QueryType |
getQueryType() |
String |
getTopLeft() |
protected static GeoBoundingBoxQuery.Builder |
newBuilder() |
com.google.protobuf.ByteString |
serialize() |
void |
setBottomRight(String bottomRight) |
void |
setFieldName(String fieldName) |
void |
setTopLeft(String topLeft) |
public String getFieldName()
public void setFieldName(String fieldName)
public String getTopLeft()
public void setTopLeft(String topLeft)
public String getBottomRight()
public void setBottomRight(String bottomRight)
public QueryType getQueryType()
getQueryType in interface Querypublic com.google.protobuf.ByteString serialize()
protected static GeoBoundingBoxQuery.Builder newBuilder()
Copyright © 2024. All Rights Reserved.