Showing
1 changed file
with
118 additions
and
66 deletions
@@ -7,8 +7,10 @@ http://192.168.102.17:8087/yohomars-search | @@ -7,8 +7,10 @@ http://192.168.102.17:8087/yohomars-search | ||
7 | http://192.168.102.17:8087/yohomars-search/search.json | 7 | http://192.168.102.17:8087/yohomars-search/search.json |
8 | 联想接口: | 8 | 联想接口: |
9 | http://192.168.102.17:8087/yohomars-search/suggest.json | 9 | http://192.168.102.17:8087/yohomars-search/suggest.json |
10 | +聚合接口: | ||
11 | +http://192.168.102.17:8087/yohomars-search/aggregate.json | ||
10 | 12 | ||
11 | - | 13 | +##查询 |
12 | 指定索引参数(必传) | 14 | 指定索引参数(必传) |
13 | 参数名: type | 15 | 参数名: type |
14 | |类型|参数值| | 16 | |类型|参数值| |
@@ -26,6 +28,7 @@ http://192.168.102.17:8087/yohomars-search/suggest.json | @@ -26,6 +28,7 @@ http://192.168.102.17:8087/yohomars-search/suggest.json | ||
26 | |id|int|id| | 28 | |id|int|id| |
27 | |city_id|int|城市标识| | 29 | |city_id|int|城市标识| |
28 | |bizId|int|商圈标识| | 30 | |bizId|int|商圈标识| |
31 | +|is_recommend|int|是否推荐| | ||
29 | |recommend_time|int|推荐时间| | 32 | |recommend_time|int|推荐时间| |
30 | |order_by|int|排序| | 33 | |order_by|int|排序| |
31 | |consumption|int|消费量| | 34 | |consumption|int|消费量| |
@@ -42,6 +45,7 @@ http://192.168.102.17:8087/yohomars-search/suggest.json | @@ -42,6 +45,7 @@ http://192.168.102.17:8087/yohomars-search/suggest.json | ||
42 | |store_first|string|综合的查询字段| | 45 | |store_first|string|综合的查询字段| |
43 | |des|string|描述| | 46 | |des|string|描述| |
44 | |suggest|string|用于搜索栏联想的字段| | 47 | |suggest|string|用于搜索栏联想的字段| |
48 | +|isShield|int|是否屏蔽| | ||
45 | 49 | ||
46 | 50 | ||
47 | ####查询所有: | 51 | ####查询所有: |
@@ -65,12 +69,6 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=store | @@ -65,12 +69,6 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=store | ||
65 | ``` | 69 | ``` |
66 | field:所有int类型字段 | 70 | field:所有int类型字段 |
67 | 71 | ||
68 | -####排序: | ||
69 | -``` | ||
70 | -格式: order=param1:param2 | ||
71 | -``` | ||
72 | -param1: 所有int类型字段: | ||
73 | -param2:asc:增序 desc:降序 | ||
74 | 72 | ||
75 | ####返回字段: | 73 | ####返回字段: |
76 | 默认:返回所有字段 | 74 | 默认:返回所有字段 |
@@ -82,78 +80,77 @@ param2:asc:增序 desc:降序 | @@ -82,78 +80,77 @@ param2:asc:增序 desc:降序 | ||
82 | ####返回数据结构 | 80 | ####返回数据结构 |
83 | ``` | 81 | ``` |
84 | { | 82 | { |
85 | - "code": 200, | ||
86 | - "status": 0, | ||
87 | - "time": 23, | 83 | + "code": 200, |
84 | + "status": 0, | ||
85 | + "time": 14, | ||
88 | "matches": { | 86 | "matches": { |
89 | - "total": 21, | ||
90 | - "page": 1, | ||
91 | - "Total_page": 3, | 87 | + "total": 1620, |
88 | + "page": 1, | ||
89 | + "Total_page": 162, | ||
92 | "data": [ | 90 | "data": [ |
93 | { | 91 | { |
94 | - "217": { | ||
95 | - "store_first": "餐厅 餐廳12 衡山路 衡山路 Hengshan Lu 岳阳路1号(教育会堂内)", | ||
96 | - "latitude": 0.5447998659809271, | ||
97 | - "consumption": 750, | ||
98 | - "assessment_num": 0, | ||
99 | - "sort": 99999, | ||
100 | - "suggest": " 洋房火锅", | ||
101 | - "store_name_tc": "洋房火鍋", | ||
102 | - "tags": 7, | ||
103 | - "score": 5, | ||
104 | - "store_english_name": "", | ||
105 | - "des": "xxx", | ||
106 | - "pin": { | ||
107 | - "location": [ | ||
108 | - 2.1198505724539, | ||
109 | - 0.5447998659809271 | ||
110 | - ] | ||
111 | - }, | ||
112 | - "is_recommend": 0, | ||
113 | - "bizId": 32, | ||
114 | - "store_name": "洋房火锅", | ||
115 | - "order_by": 999999, | ||
116 | - "id": 217, | ||
117 | - "city_id": 890, | ||
118 | - "longitude": 2.1198505724539 | ||
119 | - }, | ||
120 | - "288": { | ||
121 | - "store_first": "餐厅 餐廳12 墨田区 墨田區 Sumida 横川2-14-5 橫川2-14-5", | ||
122 | - "latitude": 0.6231134265630897, | 92 | + "store_first": "购物名所 購物名所 前门123 前門 Qianmen 杨梅竹斜街26号 楊梅竹斜街26號", |
93 | + "isShield": 0, | ||
94 | + "latitude": 0.6964247164294038, | ||
95 | + "consumption": 200, | ||
96 | + "assessment_num": 0, | ||
97 | + "sort": 99999, | ||
98 | + "suggest": "Triple-Major 藥1739", | ||
99 | + "store_name_tc": "藥", | ||
100 | + "tags": 14, | ||
101 | + "score": 5, | ||
102 | + "store_english_name": "Triple-Major", | ||
103 | + "des": "搬离了宝钞胡同,Triple-Major于北京的《藥》店在2015年初走进了这一年来声名大噪的杨梅竹斜街。别因其店名为《藥》就误以为它是药店,事实上它是不少时装精出没的买手店。顾名思义,中药是贯穿整个《藥》店的主线,除了装修、视觉元素围绕传统中药铺来出发外,甚至连这里的8个空间分割都跟中药有关。“本草”是用于举办各种互动活动,例如之前有个设计师就在这儿开了个“花果茶小卖部”,你可以利用3台扭蛋机来取出3种不同的花、果、茶材料来泡杯茶。而空间“五味”中的吊柜则从中药的甘、酸、苦、咸和辛这五味来分区,里面分别置有不同的衣服和配件供你选择。“四气”则是用于举办展览的区域,你会在这里看到定期更换的展览……所谓百闻不如一见,剩余的空间就交给你发掘了,mars就不一一跟你啰嗦了。 搬離了寶鈔胡同,Triple-Major于北京的《藥》店在2015年初走進了這一年來聲名大噪的楊梅竹斜街。别因其店名為《藥》就誤以為它是藥店,事實上它是不少時裝精出沒的買手店。顧名思義,中藥是貫穿整個《藥》店的主線,除了裝修、視覺元素圍繞傳統中藥鋪來出發外,甚至連這裡的8個空間分割都跟中藥有關。“本草”是用于舉辦各種互動活動,例如之前有個設計師就在這兒開了個“花果茶小賣部”,你可以利用3台扭蛋機來取出3種不同的花、果、茶材料來泡杯茶。而空間“五味”中的吊櫃則從中藥的甘、酸、苦、鹹和辛這五味來分區,裡面分别置有不同的衣服和配件供你選擇。“四氣”則是用于舉辦展覽的區域,你會在這裡看到定期更換的展覽……所謂百聞不如一見,剩余的空間就交給你發掘了,mars就不一一跟你啰嗦了。 时装 時裝,潮流 潮流,时尚 時尚", | ||
104 | + "pin": { | ||
105 | + "location": [ | ||
106 | + 2.0315554651529357, | ||
107 | + 0.6964247164294038 | ||
108 | + ] | ||
109 | + }, | ||
110 | + "is_recommend": 0, | ||
111 | + "bizId": 1, | ||
112 | + "store_name": "藥1739", | ||
113 | + "order_by": 999999, | ||
114 | + "id": 2, | ||
115 | + "city_id": 2, | ||
116 | + "longitude": 2.0315554651529357 | ||
117 | + }, | ||
118 | + { | ||
119 | + "store_first": "书店 書店 前门123 前門 Qianmen 杨梅竹斜街23号 楊梅竹斜街23號", | ||
120 | + "isShield": 0, | ||
121 | + "latitude": 0.6964306156422756, | ||
123 | ``` | 122 | ``` |
124 | 123 | ||
125 | 124 | ||
126 | -####联想: | 125 | +##联想: |
127 | http://192.168.102.17:8087/yohomars-search/suggest.json?type=bizarea&query=联想词 | 126 | http://192.168.102.17:8087/yohomars-search/suggest.json?type=bizarea&query=联想词 |
128 | 127 | ||
129 | 128 | ||
130 | ####返回数据结构 | 129 | ####返回数据结构 |
131 | ``` | 130 | ``` |
132 | { | 131 | { |
133 | - "code": 200, | ||
134 | - "status": 0, | ||
135 | - "time": 10, | 132 | + "code": 200, |
133 | + "status": 0, | ||
134 | + "time": 8, | ||
136 | "matches": { | 135 | "matches": { |
137 | - "total": 5, | ||
138 | - "page": 1, | ||
139 | - "Total_page": 1, | 136 | + "total": 5, |
137 | + "page": 1, | ||
138 | + "Total_page": 1, | ||
140 | "data": [ | 139 | "data": [ |
141 | { | 140 | { |
142 | - "217": { | ||
143 | - "suggest": " 洋房火锅" | ||
144 | - }, | ||
145 | - "419": { | ||
146 | - "suggest": " 辉哥火锅 巨鹿路店" | ||
147 | - }, | ||
148 | - "652": { | ||
149 | - "suggest": "Mr. Meat 肉大人肉铺火锅" | ||
150 | - }, | ||
151 | - "948": { | ||
152 | - "suggest": " 夫妻肺片之味位火锅" | ||
153 | - }, | ||
154 | - "950": { | ||
155 | - "suggest": " 花开藤蔓火锅" | ||
156 | - } | 141 | + "suggest": " 洋房火锅" |
142 | + }, | ||
143 | + { | ||
144 | + "suggest": " 辉哥火锅 巨鹿路店" | ||
145 | + }, | ||
146 | + { | ||
147 | + "suggest": " 花开藤蔓火锅" | ||
148 | + }, | ||
149 | + { | ||
150 | + "suggest": "Mr. Meat 肉大人肉铺火锅" | ||
151 | + }, | ||
152 | + { | ||
153 | + "suggest": " 夫妻肺片之味位火锅" | ||
157 | } | 154 | } |
158 | ] | 155 | ] |
159 | } | 156 | } |
@@ -214,8 +211,8 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=line | @@ -214,8 +211,8 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=line | ||
214 | |名称|存储类型|描述 | 211 | |名称|存储类型|描述 |
215 | |---|---|---| | 212 | |---|---|---| |
216 | |id|int|id| | 213 | |id|int|id| |
217 | -|title|string|主题名称| | ||
218 | -|title_tc|string|主题繁体名称| | 214 | +|title|string|线路名称| |
215 | +|title_tc|string|线路繁体名称| | ||
219 | |is_top|int|是否置顶| | 216 | |is_top|int|是否置顶| |
220 | |top_time|int|置顶时间| | 217 | |top_time|int|置顶时间| |
221 | |city_id|int|城市标志| | 218 | |city_id|int|城市标志| |
@@ -256,6 +253,61 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=comment | @@ -256,6 +253,61 @@ http://192.168.102.17:8087/yohomars-search/search.json?type=comment | ||
256 | 其他同店铺 | 253 | 其他同店铺 |
257 | 254 | ||
258 | 255 | ||
256 | +##直接更新索引数据 | ||
257 | +接口地址: | ||
258 | +http://192.168.102.17:8087/yohomars-search/updateIndex.json? | ||
259 | + | ||
260 | +参数: | ||
261 | +|参数名|描述|值举例 | ||
262 | +|---|---|---| | ||
263 | +|indexName | 索引名 | bizarea,store,line,topic,comment | ||
264 | +|action |操作 |update,delete | ||
265 | +|id | 数据id| id | ||
266 | +|data |更新的数据|field1:value1,field2:value2 | ||
267 | + | ||
268 | +data格式 | ||
269 | +``` | ||
270 | +field1:value1,field2:value2 | ||
271 | +``` | ||
272 | + | ||
273 | +示例: | ||
274 | +更新: | ||
275 | +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 | ||
276 | +删除: | ||
277 | +http://192.168.102.17:8087/yohomars-search/updateIndex.json?indexName=bizarea&action=delete&id=1 | ||
278 | + | ||
279 | +###排序 | ||
280 | +``` | ||
281 | +格式: order=param1:param2,param1:param2 | ||
282 | +``` | ||
283 | +param1: 所有int类型字段: | ||
284 | +param2:asc:增序 desc:降序 | ||
285 | + | ||
286 | +####距离排序规则 | ||
287 | +``` | ||
288 | +distance_order = param | ||
289 | +``` | ||
290 | +param:asc:增序 desc:降序 | ||
291 | + | ||
292 | +####随机排序 | ||
293 | +``` | ||
294 | +order = random | ||
295 | +``` | ||
296 | + | ||
297 | + | ||
298 | +##聚合 | ||
299 | +场景1:查询指定城市的商圈id | ||
300 | +url示例: | ||
301 | +http://192.168.102.17:8087/yohomars-search/aggregate?scene=aggBizAreaByCity&city_id=2 | ||
302 | +场景2:查询用户评价过的店铺id | ||
303 | +url示例: | ||
304 | +http://192.168.102.17:8087/yohomars-search/aggregate?scene=aggStoreByUser&uid=18108594 | ||
305 | + | ||
306 | + | ||
307 | + | ||
308 | + | ||
309 | + | ||
310 | + | ||
259 | 311 | ||
260 | 312 | ||
261 | 313 |
-
Please register or login to post a comment