...
|
...
|
@@ -7,8 +7,10 @@ http://192.168.102.17:8087/yohomars-search |
|
|
http://192.168.102.17:8087/yohomars-search/search.json
|
|
|
联想接口:
|
|
|
http://192.168.102.17:8087/yohomars-search/suggest.json
|
|
|
聚合接口:
|
|
|
http://192.168.102.17:8087/yohomars-search/aggregate.json
|
|
|
|
|
|
|
|
|
##查询
|
|
|
指定索引参数(必传)
|
|
|
参数名: type
|
|
|
|类型|参数值|
|
...
|
...
|
@@ -26,6 +28,7 @@ http://192.168.102.17:8087/yohomars-search/suggest.json |
|
|
|id|int|id|
|
|
|
|city_id|int|城市标识|
|
|
|
|bizId|int|商圈标识|
|
|
|
|is_recommend|int|是否推荐|
|
|
|
|recommend_time|int|推荐时间|
|
|
|
|order_by|int|排序|
|
|
|
|consumption|int|消费量|
|
...
|
...
|
@@ -42,6 +45,7 @@ http://192.168.102.17:8087/yohomars-search/suggest.json |
|
|
|store_first|string|综合的查询字段|
|
|
|
|des|string|描述|
|
|
|
|suggest|string|用于搜索栏联想的字段|
|
|
|
|isShield|int|是否屏蔽|
|
|
|
|
|
|
|
|
|
####查询所有:
|
...
|
...
|
@@ -65,12 +69,6 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=store |
|
|
```
|
|
|
field:所有int类型字段
|
|
|
|
|
|
####排序:
|
|
|
```
|
|
|
格式: order=param1:param2
|
|
|
```
|
|
|
param1: 所有int类型字段:
|
|
|
param2:asc:增序 desc:降序
|
|
|
|
|
|
####返回字段:
|
|
|
默认:返回所有字段
|
...
|
...
|
@@ -82,78 +80,77 @@ param2:asc:增序 desc:降序 |
|
|
####返回数据结构
|
|
|
```
|
|
|
{
|
|
|
"code": 200,
|
|
|
"status": 0,
|
|
|
"time": 23,
|
|
|
"code": 200,
|
|
|
"status": 0,
|
|
|
"time": 14,
|
|
|
"matches": {
|
|
|
"total": 21,
|
|
|
"page": 1,
|
|
|
"Total_page": 3,
|
|
|
"total": 1620,
|
|
|
"page": 1,
|
|
|
"Total_page": 162,
|
|
|
"data": [
|
|
|
{
|
|
|
"217": {
|
|
|
"store_first": "餐厅 餐廳12 衡山路 衡山路 Hengshan Lu 岳阳路1号(教育会堂内)",
|
|
|
"latitude": 0.5447998659809271,
|
|
|
"consumption": 750,
|
|
|
"assessment_num": 0,
|
|
|
"sort": 99999,
|
|
|
"suggest": " 洋房火锅",
|
|
|
"store_name_tc": "洋房火鍋",
|
|
|
"tags": 7,
|
|
|
"score": 5,
|
|
|
"store_english_name": "",
|
|
|
"des": "xxx",
|
|
|
"pin": {
|
|
|
"location": [
|
|
|
2.1198505724539,
|
|
|
0.5447998659809271
|
|
|
]
|
|
|
},
|
|
|
"is_recommend": 0,
|
|
|
"bizId": 32,
|
|
|
"store_name": "洋房火锅",
|
|
|
"order_by": 999999,
|
|
|
"id": 217,
|
|
|
"city_id": 890,
|
|
|
"longitude": 2.1198505724539
|
|
|
},
|
|
|
"288": {
|
|
|
"store_first": "餐厅 餐廳12 墨田区 墨田區 Sumida 横川2-14-5 橫川2-14-5",
|
|
|
"latitude": 0.6231134265630897,
|
|
|
"store_first": "购物名所 購物名所 前门123 前門 Qianmen 杨梅竹斜街26号 楊梅竹斜街26號",
|
|
|
"isShield": 0,
|
|
|
"latitude": 0.6964247164294038,
|
|
|
"consumption": 200,
|
|
|
"assessment_num": 0,
|
|
|
"sort": 99999,
|
|
|
"suggest": "Triple-Major 藥1739",
|
|
|
"store_name_tc": "藥",
|
|
|
"tags": 14,
|
|
|
"score": 5,
|
|
|
"store_english_name": "Triple-Major",
|
|
|
"des": "搬离了宝钞胡同,Triple-Major于北京的《藥》店在2015年初走进了这一年来声名大噪的杨梅竹斜街。别因其店名为《藥》就误以为它是药店,事实上它是不少时装精出没的买手店。顾名思义,中药是贯穿整个《藥》店的主线,除了装修、视觉元素围绕传统中药铺来出发外,甚至连这里的8个空间分割都跟中药有关。“本草”是用于举办各种互动活动,例如之前有个设计师就在这儿开了个“花果茶小卖部”,你可以利用3台扭蛋机来取出3种不同的花、果、茶材料来泡杯茶。而空间“五味”中的吊柜则从中药的甘、酸、苦、咸和辛这五味来分区,里面分别置有不同的衣服和配件供你选择。“四气”则是用于举办展览的区域,你会在这里看到定期更换的展览……所谓百闻不如一见,剩余的空间就交给你发掘了,mars就不一一跟你啰嗦了。 搬離了寶鈔胡同,Triple-Major于北京的《藥》店在2015年初走進了這一年來聲名大噪的楊梅竹斜街。别因其店名為《藥》就誤以為它是藥店,事實上它是不少時裝精出沒的買手店。顧名思義,中藥是貫穿整個《藥》店的主線,除了裝修、視覺元素圍繞傳統中藥鋪來出發外,甚至連這裡的8個空間分割都跟中藥有關。“本草”是用于舉辦各種互動活動,例如之前有個設計師就在這兒開了個“花果茶小賣部”,你可以利用3台扭蛋機來取出3種不同的花、果、茶材料來泡杯茶。而空間“五味”中的吊櫃則從中藥的甘、酸、苦、鹹和辛這五味來分區,裡面分别置有不同的衣服和配件供你選擇。“四氣”則是用于舉辦展覽的區域,你會在這裡看到定期更換的展覽……所謂百聞不如一見,剩余的空間就交給你發掘了,mars就不一一跟你啰嗦了。 时装 時裝,潮流 潮流,时尚 時尚",
|
|
|
"pin": {
|
|
|
"location": [
|
|
|
2.0315554651529357,
|
|
|
0.6964247164294038
|
|
|
]
|
|
|
},
|
|
|
"is_recommend": 0,
|
|
|
"bizId": 1,
|
|
|
"store_name": "藥1739",
|
|
|
"order_by": 999999,
|
|
|
"id": 2,
|
|
|
"city_id": 2,
|
|
|
"longitude": 2.0315554651529357
|
|
|
},
|
|
|
{
|
|
|
"store_first": "书店 書店 前门123 前門 Qianmen 杨梅竹斜街23号 楊梅竹斜街23號",
|
|
|
"isShield": 0,
|
|
|
"latitude": 0.6964306156422756,
|
|
|
```
|
|
|
|
|
|
|
|
|
####联想:
|
|
|
##联想:
|
|
|
http://192.168.102.17:8087/yohomars-search/suggest.json?type=bizarea&query=联想词
|
|
|
|
|
|
|
|
|
####返回数据结构
|
|
|
```
|
|
|
{
|
|
|
"code": 200,
|
|
|
"status": 0,
|
|
|
"time": 10,
|
|
|
"code": 200,
|
|
|
"status": 0,
|
|
|
"time": 8,
|
|
|
"matches": {
|
|
|
"total": 5,
|
|
|
"page": 1,
|
|
|
"Total_page": 1,
|
|
|
"total": 5,
|
|
|
"page": 1,
|
|
|
"Total_page": 1,
|
|
|
"data": [
|
|
|
{
|
|
|
"217": {
|
|
|
"suggest": " 洋房火锅"
|
|
|
},
|
|
|
"419": {
|
|
|
"suggest": " 辉哥火锅 巨鹿路店"
|
|
|
},
|
|
|
"652": {
|
|
|
"suggest": "Mr. Meat 肉大人肉铺火锅"
|
|
|
},
|
|
|
"948": {
|
|
|
"suggest": " 夫妻肺片之味位火锅"
|
|
|
},
|
|
|
"950": {
|
|
|
"suggest": " 花开藤蔓火锅"
|
|
|
}
|
|
|
"suggest": " 洋房火锅"
|
|
|
},
|
|
|
{
|
|
|
"suggest": " 辉哥火锅 巨鹿路店"
|
|
|
},
|
|
|
{
|
|
|
"suggest": " 花开藤蔓火锅"
|
|
|
},
|
|
|
{
|
|
|
"suggest": "Mr. Meat 肉大人肉铺火锅"
|
|
|
},
|
|
|
{
|
|
|
"suggest": " 夫妻肺片之味位火锅"
|
|
|
}
|
|
|
]
|
|
|
}
|
...
|
...
|
@@ -214,8 +211,8 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=line |
|
|
|名称|存储类型|描述
|
|
|
|---|---|---|
|
|
|
|id|int|id|
|
|
|
|title|string|主题名称|
|
|
|
|title_tc|string|主题繁体名称|
|
|
|
|title|string|线路名称|
|
|
|
|title_tc|string|线路繁体名称|
|
|
|
|is_top|int|是否置顶|
|
|
|
|top_time|int|置顶时间|
|
|
|
|city_id|int|城市标志|
|
...
|
...
|
@@ -256,6 +253,61 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=comment |
|
|
其他同店铺
|
|
|
|
|
|
|
|
|
##直接更新索引数据
|
|
|
接口地址:
|
|
|
http://192.168.102.17:8087/yohomars-search/updateIndex.json?
|
|
|
|
|
|
参数:
|
|
|
|参数名|描述|值举例
|
|
|
|---|---|---|
|
|
|
|indexName | 索引名 | bizarea,store,line,topic,comment
|
|
|
|action |操作 |update,delete
|
|
|
|id | 数据id| id
|
|
|
|data |更新的数据|field1:value1,field2:value2
|
|
|
|
|
|
data格式
|
|
|
```
|
|
|
field1:value1,field2:value2
|
|
|
```
|
|
|
|
|
|
示例:
|
|
|
更新:
|
|
|
http://192.168.102.17:8087/yohomars-search/updateIndex.json?indexName=bizarea&action=update&id=1&data=name:%E5%89%8D%E9%97%A8Test,english_name:QianmenTest
|
|
|
删除:
|
|
|
http://192.168.102.17:8087/yohomars-search/updateIndex.json?indexName=bizarea&action=delete&id=1
|
|
|
|
|
|
###排序
|
|
|
```
|
|
|
格式: order=param1:param2,param1:param2
|
|
|
```
|
|
|
param1: 所有int类型字段:
|
|
|
param2:asc:增序 desc:降序
|
|
|
|
|
|
####距离排序规则
|
|
|
```
|
|
|
distance_order = param
|
|
|
```
|
|
|
param:asc:增序 desc:降序
|
|
|
|
|
|
####随机排序
|
|
|
```
|
|
|
order = random
|
|
|
```
|
|
|
|
|
|
|
|
|
##聚合
|
|
|
场景1:查询指定城市的商圈id
|
|
|
url示例:
|
|
|
http://192.168.102.17:8087/yohomars-search/aggregate?scene=aggBizAreaByCity&city_id=2
|
|
|
场景2:查询用户评价过的店铺id
|
|
|
url示例:
|
|
|
http://192.168.102.17:8087/yohomars-search/aggregate?scene=aggStoreByUser&uid=18108594
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|