public class SuggestionParam extends java.lang.Object implements ParamObject
Modifier and Type | Class and Description |
---|---|
static class |
SuggestionParam.AddressFormat |
static class |
SuggestionParam.Policy |
Constructor and Description |
---|
SuggestionParam() |
SuggestionParam(java.lang.String keyword,
java.lang.String region)
创建搜索建议参数
|
Modifier and Type | Method and Description |
---|---|
SuggestionParam |
addressFormat(SuggestionParam.AddressFormat format)
可选值:
SuggestionParam.AddressFormat.SHORT
返回“不带行政区划的”短地址 |
RequestParams |
buildParameters()
构造参数
|
boolean |
checkParams()
检查参数输入是否正确
|
SuggestionParam |
filter(java.lang.String... values)
筛选条件
|
SuggestionParam |
getSubPois(boolean enable)
是否返回子地点,如大厦停车场、出入口等取值:
0 [默认]不返回
1 返回
|
SuggestionParam |
keyword(java.lang.String keyword)
关键字
|
SuggestionParam |
location(LatLng location)
定位坐标,传入后,若用户搜索关键词为类别词(如酒店、餐馆时),与此坐标距离近的地点将靠前显示,格式: location=lat,lng
|
SuggestionParam |
pageIndex(int page_index)
第x页,默认第1页
|
SuggestionParam |
pageSize(int pagesize)
每页条目数,最大限制为20条。
|
SuggestionParam |
policy(SuggestionParam.Policy policy)
检索策略,目前支持:
policy=
SuggestionParam.Policy.DEF 默认,常规策略
policy=SuggestionParam.Policy.O2O 本策略主要用于收货地址、上门服务地址的填写,
提高了小区类、商务楼宇、大学等分类的排序,过滤行政区、
道路等分类(如海淀大街、朝阳区等),排序策略引入真实用户对输入提示的点击热度,
使之更为符合此类应用场景,体验更为舒适
policy=SuggestionParam.Policy.TRIP_START 出行场景(网约车) – 起点查询
policy=SuggestionParam.Policy.TRIP_END 出行场景(网约车) – 终点查询 |
SuggestionParam |
region(java.lang.String region)
地区名
|
SuggestionParam |
regionFix(boolean enable)
0:[默认]当前城市无结果时,自动扩大范围到全国匹配
1:固定在当前城市
|
public SuggestionParam()
public SuggestionParam(java.lang.String keyword, java.lang.String region)
keyword
- 关键字region
- 地区名public SuggestionParam keyword(java.lang.String keyword)
keyword
- public SuggestionParam region(java.lang.String region)
region
- public SuggestionParam filter(java.lang.String... values)
values
- http://lbs.qq.com/webservice_v1/guide-appendix.htmlpublic SuggestionParam regionFix(boolean enable)
public SuggestionParam location(LatLng location)
location
- public SuggestionParam getSubPois(boolean enable)
public SuggestionParam addressFormat(SuggestionParam.AddressFormat format)
SuggestionParam.AddressFormat.SHORT
返回“不带行政区划的”短地址format
- public SuggestionParam policy(SuggestionParam.Policy policy)
SuggestionParam.Policy.DEF
默认,常规策略
policy=SuggestionParam.Policy.O2O
本策略主要用于收货地址、上门服务地址的填写,
提高了小区类、商务楼宇、大学等分类的排序,过滤行政区、
道路等分类(如海淀大街、朝阳区等),排序策略引入真实用户对输入提示的点击热度,
使之更为符合此类应用场景,体验更为舒适
policy=SuggestionParam.Policy.TRIP_START
出行场景(网约车) – 起点查询
policy=SuggestionParam.Policy.TRIP_END
出行场景(网约车) – 终点查询public SuggestionParam pageIndex(int page_index)
public SuggestionParam pageSize(int pagesize)
public boolean checkParams()
ParamObject
checkParams
in interface ParamObject
public RequestParams buildParameters()
ParamObject
buildParameters
in interface ParamObject