Authored by qianjun

update

... ... @@ -406,32 +406,32 @@ http://192.168.10.64:8080/yohosearch/sortgroup.json?query=水滴&msort=3&color=2
```json
{
"message":"sort List.",
"code":200,
"data":{
"sort":[
{
"sort_id":"3",
"sort_name":"裤装",
"order_by":"90",
"count":4,
"sub":[
{
"sort_id":"26",
"sort_name":"休闲裤",
"order_by":"20",
"count":1
},
{
"sort_id":"27",
"sort_name":"牛仔裤",
"order_by":"19",
"count":3
}
]
}
]
}
"message": "sort List.",
"code": 200,
"data": {
"sort": [
{
"sort_id": "3",
"sort_name": "裤装",
"order_by": "90",
"count": 4,
"sub": [
{
"sort_id": "26",
"sort_name": "休闲裤",
"order_by": "20",
"count": 1
},
{
"sort_id": "27",
"sort_name": "牛仔裤",
"order_by": "19",
"count": 3
}
]
}
]
}
}
```
... ... @@ -450,10 +450,10 @@ http://192.168.10.64:8080/yohosearch/sortgroup.json?query=水滴&msort=3&color=2
|count|商品数量|
#3. 搜索建议接口
3.1 请求
## 3.搜索建议接口
## 3.1 请求
3.1.1 URL格式
### 3.1.1 URL格式
http://{host}:{port}/yohosearch/suggest.json?query={searchquery}&size=5
... ... @@ -467,21 +467,17 @@ suggest:查询接口名称
其他参数见3.1.2
3.1.2 参数说明
|名称 |说明 |可空
query 关键字 否
size 返回词条个数
### 3.1.2 参数说明
默认5个 是
|名称|说明|可空|
|-----|-----|------|
|query| 关键字| 否|
|size|返回词条个数默认5个|是|
#3.2 响应
## 3.2 响应
3.2.1 报文格式
### 3.2.1 报文格式
响应报文为json格式
... ... @@ -489,41 +485,60 @@ size 返回词条个数
http://192.168.10.64:8080/yohosearch/suggest.json?query=迷彩&size=7
```json
{
code:200
suggest:{
items:[
{"item":"迷彩街头","frequency":311},
{"item":"迷彩军事","frequency":90},
{"item":"迷彩美式","frequency":84},
{"item":"迷彩拼接","frequency":75},
{"item":"迷彩t","frequency":63},
{"item":"迷彩短裤","frequency":61},
{"item":"迷彩t恤","frequency":59}]
}
code: 200suggest: {
items: [
{
"item": "迷彩街头",
"frequency": 311
},
{
"item": "迷彩军事",
"frequency": 90
},
{
"item": "迷彩美式",
"frequency": 84
},
{
"item": "迷彩拼接",
"frequency": 75
},
{
"item": "迷彩t",
"frequency": 63
},
{
"item": "迷彩短裤",
"frequency": 61
},
{
"item": "迷彩t恤",
"frequency": 59
}
]
}
}
```
查询为空:
{
code:200
suggest:{
items:[]
suggest:{
items:[]
}
}
#3.2.2 参数说明
名称 说明
suggest 报文头
items 结果集
### 3.2.2 参数说明
item 词条名
frequency 词频
|名称|说明|
|-----|-----|
|suggest|报文头|
|items|结果集|
|item|词条名|
|frequency|词频|
4.1 请求
... ...