chart.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. package elastic
  2. import (
  3. "context"
  4. "encoding/json"
  5. "eta_gn/eta_api/models/data_manage"
  6. "eta_gn/eta_api/utils"
  7. "fmt"
  8. "github.com/olivere/elastic/v7"
  9. )
  10. // AddOrEditChartInfoToEsData 新增/修改es中的图表数据
  11. func AddOrEditChartInfoToEsData(indexName, docId string, item *data_manage.ChartEsInfo) (err error) {
  12. defer func() {
  13. if err != nil {
  14. fmt.Println("EsAddOrEditData Err:", err.Error())
  15. }
  16. }()
  17. client := utils.EsClient
  18. resp, err := client.Index().Index(indexName).Id(docId).BodyJson(item).Do(context.Background())
  19. if err != nil {
  20. fmt.Println("新增失败:", err.Error())
  21. return err
  22. }
  23. fmt.Println(resp)
  24. if resp.Status == 0 {
  25. fmt.Println("新增成功", resp.Result)
  26. err = nil
  27. } else {
  28. fmt.Println("AddData", resp.Status, resp.Result)
  29. }
  30. return
  31. }
  32. func SearchChartInfoData(keywordStr string, showSysId int, sourceList []int, noPermissionChartIdList []int, from, size int) (list []*data_manage.ChartInfo, total int64, err error) {
  33. indexName := utils.CHART_INDEX_NAME
  34. list = make([]*data_manage.ChartInfo, 0)
  35. defer func() {
  36. if err != nil {
  37. fmt.Println("EsAddOrEditData Err:", err.Error())
  38. }
  39. }()
  40. client := utils.EsClient
  41. //queryString := elastic.NewQueryStringQuery(keywordStr)
  42. //boolQueryJson, err := json.Marshal(queryString)
  43. //if err != nil {
  44. // fmt.Println("boolQueryJson err:", err)
  45. //} else {
  46. // fmt.Println("boolQueryJson ", string(boolQueryJson))
  47. //}
  48. highlight := elastic.NewHighlight()
  49. highlight = highlight.Fields(elastic.NewHighlighterField("ChartName"))
  50. highlight = highlight.PreTags("<font color='red'>").PostTags("</font>")
  51. mustMap := make([]interface{}, 0)
  52. mustNotMap := make([]interface{}, 0)
  53. //图表来源
  54. if showSysId > 0 {
  55. mustMap = append(mustMap, map[string]interface{}{
  56. "term": map[string]interface{}{
  57. "SysUserId": showSysId,
  58. //"Frequency.keyword": "月度",
  59. },
  60. })
  61. }
  62. mustMap = append(mustMap, map[string]interface{}{
  63. "terms": map[string]interface{}{
  64. "Source": sourceList,
  65. },
  66. })
  67. //关键字匹配
  68. //shouldMap := map[string]interface{}{
  69. // "should": []interface{}{
  70. // map[string]interface{}{
  71. // "match": map[string]interface{}{
  72. // "ChartName": keywordStr,
  73. // //"Frequency.keyword": "月度",
  74. // },
  75. // },
  76. // // 因为关键词被分了,所以需要用下面的语句来让他 整个词 查询,从而加重整词的权重
  77. // map[string]interface{}{
  78. // "match": map[string]interface{}{
  79. // "ChartName": map[string]interface{}{
  80. // "query": keywordStr,
  81. // "operator": "and",
  82. // },
  83. // //"Frequency.keyword": "月度",
  84. // },
  85. // },
  86. // map[string]interface{}{
  87. // "match": map[string]interface{}{
  88. // "ChartNameEn": keywordStr,
  89. // //"Frequency.keyword": "月度",
  90. // },
  91. // },
  92. // // 因为关键词被分了,所以需要用下面的语句来让他 整个词 查询,从而加重整词的权重
  93. // map[string]interface{}{
  94. // "match": map[string]interface{}{
  95. // "ChartNameEn": map[string]interface{}{
  96. // "query": keywordStr,
  97. // "operator": "and",
  98. // },
  99. // //"Frequency.keyword": "月度",
  100. // },
  101. // },
  102. // },
  103. //}
  104. // 默认使用中文名字字段去匹配
  105. keywordNameKey := `ChartName`
  106. // 如果没有中文,则使用英文名称字段去匹配
  107. if !utils.ContainsChinese(keywordStr) {
  108. keywordNameKey = `ChartNameEn`
  109. }
  110. shouldMap := map[string]interface{}{
  111. "should": []interface{}{
  112. map[string]interface{}{
  113. "match": map[string]interface{}{
  114. keywordNameKey: keywordStr,
  115. //"Frequency.keyword": "月度",
  116. },
  117. },
  118. // 因为关键词被分了,所以需要用下面的语句来让他 整个词 查询,从而加重整词的权重
  119. map[string]interface{}{
  120. "match": map[string]interface{}{
  121. keywordNameKey: map[string]interface{}{
  122. "query": keywordStr,
  123. "operator": "and",
  124. },
  125. //"Frequency.keyword": "月度",
  126. },
  127. },
  128. },
  129. }
  130. mustMap = append(mustMap, map[string]interface{}{
  131. "bool": shouldMap,
  132. })
  133. // noPermissionChartIdList 无权限图表id
  134. if len(noPermissionChartIdList) > 0 {
  135. mustNotMap = append(mustNotMap, map[string]interface{}{
  136. "terms": map[string]interface{}{
  137. "ChartInfoId": noPermissionChartIdList,
  138. //"Frequency.keyword": "月度",
  139. },
  140. })
  141. }
  142. queryMap := map[string]interface{}{
  143. "query": map[string]interface{}{
  144. "bool": map[string]interface{}{
  145. "must": mustMap,
  146. "must_not": mustNotMap,
  147. //"should": shouldMap,
  148. },
  149. },
  150. }
  151. //根据条件数量统计
  152. requestTotalHits := client.Count(indexName).BodyJson(queryMap)
  153. total, err = requestTotalHits.Do(context.Background())
  154. if err != nil {
  155. return
  156. }
  157. // 分页查询
  158. queryMap["from"] = from
  159. queryMap["size"] = size
  160. jsonBytes, _ := json.Marshal(queryMap)
  161. fmt.Println(string(jsonBytes))
  162. request := client.Search(indexName).Highlight(highlight).Source(queryMap) // sets the JSON request
  163. //requestJson, err := json.Marshal(request)
  164. //if err != nil {
  165. // fmt.Println("requestJson err:", err)
  166. //}
  167. //fmt.Println("requestJson ", string(requestJson))
  168. searchMap := make(map[string]string)
  169. searchResp, err := request.Do(context.Background())
  170. if err != nil {
  171. return
  172. }
  173. fmt.Println(searchResp)
  174. fmt.Println(searchResp.Status)
  175. if searchResp.Status != 0 {
  176. return
  177. }
  178. if searchResp.Hits != nil {
  179. for _, v := range searchResp.Hits.Hits {
  180. if _, ok := searchMap[v.Id]; !ok {
  181. itemJson, tmpErr := v.Source.MarshalJSON()
  182. if tmpErr != nil {
  183. err = tmpErr
  184. fmt.Println("movieJson err:", err)
  185. return
  186. }
  187. chartInfoItem := new(data_manage.ChartInfo)
  188. tmpErr = json.Unmarshal(itemJson, &chartInfoItem)
  189. if err != nil {
  190. fmt.Println("json.Unmarshal chartInfoJson err:", err)
  191. err = tmpErr
  192. return
  193. }
  194. if len(v.Highlight["ChartName"]) > 0 {
  195. chartInfoItem.ChartName = v.Highlight["ChartName"][0]
  196. }
  197. list = append(list, chartInfoItem)
  198. searchMap[v.Id] = v.Id
  199. }
  200. }
  201. }
  202. //for _, v := range result {
  203. // fmt.Println(v)
  204. //}
  205. return
  206. }
  207. func SearchChartInfoDataByShared(keywordStr string, from, size, chartShare int, sourceList, chartTypeList, classifyIdList []int, chartAuth, sysUserId int, sortMap map[string]string) (total int64, list []*data_manage.ChartInfoView, err error) {
  208. indexName := utils.CHART_INDEX_NAME
  209. list = make([]*data_manage.ChartInfoView, 0)
  210. defer func() {
  211. if err != nil {
  212. fmt.Println("SearchChartInfoData Err:", err.Error())
  213. }
  214. }()
  215. query := elastic.NewBoolQuery()
  216. //图表来源
  217. if len(sourceList) > 0 {
  218. termsList := make([]interface{}, 0)
  219. for _, v := range sourceList {
  220. termsList = append(termsList, v)
  221. }
  222. query = query.Must(elastic.NewTermsQuery("Source", termsList...))
  223. }
  224. //图表类型
  225. if len(chartTypeList) > 0 {
  226. termsList := make([]interface{}, 0)
  227. for _, v := range chartTypeList {
  228. termsList = append(termsList, v)
  229. }
  230. query = query.Must(elastic.NewTermsQuery("ChartType", termsList...))
  231. }
  232. // classifyIdList 指定分类下的图表
  233. if len(classifyIdList) > 0 {
  234. termsList := make([]interface{}, 0)
  235. for _, v := range classifyIdList {
  236. termsList = append(termsList, v)
  237. }
  238. query = query.Must(elastic.NewTermsQuery("ChartClassifyId", termsList...))
  239. }
  240. // 如果指定了分享状态,那么就添加分享状态的筛选
  241. // 0:全部,1:未共享,2:已共享
  242. switch chartShare {
  243. case 1:
  244. // 筛选 SharedUserIdList 为空的文档
  245. query = query.MustNot(elastic.NewExistsQuery("SharedUserIdList"))
  246. case 2:
  247. // 筛选 SharedUserIdList 不为空的文档
  248. query = query.Must(elastic.NewExistsQuery("SharedUserIdList"))
  249. }
  250. // 图表名称、编码匹配
  251. if keywordStr != `` {
  252. // 默认使用中文名字字段去匹配
  253. keywordNameKey := `ChartName`
  254. query = query.Must(elastic.NewMatchQuery(keywordNameKey, keywordStr))
  255. }
  256. // 图表与用户的权限匹配
  257. {
  258. //图表权限范围,0-全部;1-我的;2-公共
  259. switch chartAuth {
  260. case 1:
  261. // 自己的图表
  262. query = query.Must(elastic.NewTermQuery(`SysUserId`, sysUserId))
  263. case 2:
  264. // 公开的图表
  265. query = query.Must(elastic.NewTermQuery(`PublicStatus`, utils.DataPublicSuccess))
  266. default:
  267. tmpShouldQuery := elastic.NewBoolQuery()
  268. // 自己的图表
  269. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermQuery(`SysUserId`, sysUserId))
  270. // 分享给我的图表
  271. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermsQuery(`SharedUserIdList`, sysUserId))
  272. //公开的图表
  273. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermQuery(`PublicStatus`, utils.DataPublicSuccess))
  274. //shouldQuery = shouldQuery.Should(tmpShouldQuery)
  275. query = query.Must(tmpShouldQuery)
  276. }
  277. }
  278. // 排序
  279. sortList := make([]*elastic.FieldSort, 0)
  280. // 如果没有关键字,那么就走图表id倒序
  281. for orderKey, orderType := range sortMap {
  282. switch orderType {
  283. case "asc":
  284. sortList = append(sortList, elastic.NewFieldSort(orderKey).Asc())
  285. case "desc":
  286. sortList = append(sortList, elastic.NewFieldSort(orderKey).Desc())
  287. }
  288. }
  289. return searchChartInfoData(indexName, query, sortList, from, size)
  290. }
  291. func SearchChartInfoDataByPublic(keywordStr string, from, size int, chartPublicList, sourceList, chartTypeList, classifyIdList, publicClassifyIdList []int, chartAuth, sysUserId int, sortMap map[string]string) (total int64, list []*data_manage.ChartInfoView, err error) {
  292. indexName := utils.CHART_INDEX_NAME
  293. list = make([]*data_manage.ChartInfoView, 0)
  294. defer func() {
  295. if err != nil {
  296. fmt.Println("SearchChartInfoData Err:", err.Error())
  297. }
  298. }()
  299. query := elastic.NewBoolQuery()
  300. //图表来源
  301. if len(sourceList) > 0 {
  302. termsList := make([]interface{}, 0)
  303. for _, v := range sourceList {
  304. termsList = append(termsList, v)
  305. }
  306. query = query.Must(elastic.NewTermsQuery("Source", termsList...))
  307. }
  308. // 图表类型
  309. if len(chartTypeList) > 0 {
  310. termsList := make([]interface{}, 0)
  311. for _, v := range chartTypeList {
  312. termsList = append(termsList, v)
  313. }
  314. query = query.Must(elastic.NewTermsQuery("ChartType", termsList...))
  315. }
  316. // classifyIdList 指定分类下的图表
  317. if len(classifyIdList) > 0 {
  318. termsList := make([]interface{}, 0)
  319. for _, v := range classifyIdList {
  320. termsList = append(termsList, v)
  321. }
  322. query = query.Must(elastic.NewTermsQuery("ChartClassifyId", termsList...))
  323. }
  324. // publicClassifyIdList 指定公共分类下的图表
  325. if len(publicClassifyIdList) > 0 {
  326. termsList := make([]interface{}, 0)
  327. for _, v := range publicClassifyIdList {
  328. termsList = append(termsList, v)
  329. }
  330. query = query.Must(elastic.NewTermsQuery("ChartPublicClassifyId", termsList...))
  331. }
  332. // 如果指定了图表公开状态,那么就添加图表公开状态的筛选
  333. // 公开状态;0:未公开;1:审批中;2:已驳回;3:已公开
  334. if len(chartPublicList) > 0 {
  335. termsList := make([]interface{}, 0)
  336. for _, v := range chartPublicList {
  337. termsList = append(termsList, v)
  338. }
  339. query = query.Must(elastic.NewTermsQuery("PublicStatus", termsList...))
  340. }
  341. // 图表名称、编码匹配
  342. if keywordStr != `` {
  343. // 默认使用中文名字字段去匹配
  344. keywordNameKey := `ChartName`
  345. query = query.Must(elastic.NewMatchQuery(keywordNameKey, keywordStr))
  346. }
  347. // 图表与用户的权限匹配
  348. {
  349. //图表权限范围,0-全部;1-我的;2-公共
  350. switch chartAuth {
  351. case 1:
  352. // 自己的图表
  353. query = query.Must(elastic.NewTermQuery(`SysUserId`, sysUserId))
  354. case 2:
  355. // 公开的图表
  356. query = query.Must(elastic.NewTermQuery(`PublicStatus`, utils.DataPublicSuccess))
  357. default:
  358. tmpShouldQuery := elastic.NewBoolQuery()
  359. // 自己的图表
  360. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermQuery(`SysUserId`, sysUserId))
  361. // 分享给我的图表
  362. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermsQuery(`SharedUserIdList`, sysUserId))
  363. //公开的图表
  364. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermQuery(`PublicStatus`, utils.DataPublicSuccess))
  365. //shouldQuery = shouldQuery.Should(tmpShouldQuery)
  366. query = query.Must(tmpShouldQuery)
  367. }
  368. }
  369. // 排序
  370. sortList := make([]*elastic.FieldSort, 0)
  371. // 如果没有关键字,那么就走图表id倒序
  372. for orderKey, orderType := range sortMap {
  373. switch orderType {
  374. case "asc":
  375. sortList = append(sortList, elastic.NewFieldSort(orderKey).Asc())
  376. case "desc":
  377. sortList = append(sortList, elastic.NewFieldSort(orderKey).Desc())
  378. }
  379. }
  380. return searchChartInfoData(indexName, query, sortList, from, size)
  381. }
  382. // searchChartInfoData 查询es中的图表数据
  383. func searchChartInfoData(indexName string, query elastic.Query, sortList []*elastic.FieldSort, from, size int) (total int64, list []*data_manage.ChartInfoView, err error) {
  384. total, err = searchChartInfoDataTotal(indexName, query)
  385. if err != nil {
  386. return
  387. }
  388. // 获取列表数据
  389. list, err = searchChartInfoDataList(indexName, query, sortList, from, size)
  390. if err != nil {
  391. return
  392. }
  393. return
  394. }
  395. // searchChartInfoDataTotal 查询es中的图表数量
  396. func searchChartInfoDataTotal(indexName string, query elastic.Query) (total int64, err error) {
  397. defer func() {
  398. if err != nil {
  399. fmt.Println("searchChartInfoDataTotal Err:", err.Error())
  400. }
  401. }()
  402. client := utils.EsClient
  403. //根据条件数量统计
  404. requestTotalHits := client.Count(indexName).Query(query)
  405. total, err = requestTotalHits.Do(context.Background())
  406. if err != nil {
  407. return
  408. }
  409. return
  410. }
  411. // searchChartInfoData 查询es中的图表数据
  412. func searchChartInfoDataList(indexName string, query elastic.Query, sortList []*elastic.FieldSort, from, size int) (list []*data_manage.ChartInfoView, err error) {
  413. list = make([]*data_manage.ChartInfoView, 0)
  414. defer func() {
  415. if err != nil {
  416. fmt.Println("searchChartInfoDataList Err:", err.Error())
  417. }
  418. }()
  419. client := utils.EsClient
  420. // 高亮
  421. //highlight := elastic.NewHighlight()
  422. //highlight = highlight.Fields(elastic.NewHighlighterField("ChartName"))
  423. //highlight = highlight.PreTags("<font color='red'>").PostTags("</font>")
  424. //request := client.Search(indexName).Highlight(highlight).From(from).Size(size) // sets the JSON request
  425. request := client.Search(indexName).From(from).Size(size) // sets the JSON request
  426. // 如果有指定排序,那么就按照排序来
  427. if len(sortList) > 0 {
  428. for _, v := range sortList {
  429. request = request.SortBy(v)
  430. }
  431. }
  432. searchMap := make(map[string]string)
  433. searchResp, err := request.Query(query).Do(context.Background())
  434. if err != nil {
  435. return
  436. }
  437. //fmt.Println(searchResp)
  438. //fmt.Println(searchResp.Status)
  439. if searchResp.Status != 0 {
  440. return
  441. }
  442. //total = searchResp.TotalHits()
  443. if searchResp.Hits != nil {
  444. for _, v := range searchResp.Hits.Hits {
  445. if _, ok := searchMap[v.Id]; !ok {
  446. itemJson, tmpErr := v.Source.MarshalJSON()
  447. if tmpErr != nil {
  448. err = tmpErr
  449. fmt.Println("MarshalJSON err:", err)
  450. return
  451. }
  452. chartInfoItem := new(data_manage.ChartInfoView)
  453. tmpErr = json.Unmarshal(itemJson, &chartInfoItem)
  454. if err != nil {
  455. fmt.Println("json.Unmarshal chartInfoJson err:", err)
  456. err = tmpErr
  457. return
  458. }
  459. if len(v.Highlight["ChartName"]) > 0 {
  460. chartInfoItem.ChartName = v.Highlight["ChartName"][0]
  461. }
  462. list = append(list, chartInfoItem)
  463. searchMap[v.Id] = v.Id
  464. }
  465. }
  466. }
  467. return
  468. }
  469. // SearchChartInfoDataV2 查询es中的图表数据
  470. func SearchChartInfoDataV2(keywordStr string, showSysId, chartAuth int, sourceList []int, collectChartInfoIdList, searchClassifyIdList, searchPublicClassifyIdList []int, sortMap map[string]string, from, size int) (total int64, list []*data_manage.ChartInfoView, err error) {
  471. indexName := utils.CHART_INDEX_NAME
  472. list = make([]*data_manage.ChartInfoView, 0)
  473. defer func() {
  474. if err != nil {
  475. fmt.Println("EsAddOrEditData Err:", err.Error())
  476. }
  477. }()
  478. query := elastic.NewBoolQuery()
  479. //图表来源
  480. if len(sourceList) > 0 {
  481. termsList := make([]interface{}, 0)
  482. for _, v := range sourceList {
  483. termsList = append(termsList, v)
  484. }
  485. query = query.Must(elastic.NewTermsQuery("Source", termsList...))
  486. }
  487. // collectChartInfoIdList 指定的图表id
  488. if len(collectChartInfoIdList) > 0 {
  489. termsList := make([]interface{}, 0)
  490. for _, v := range collectChartInfoIdList {
  491. termsList = append(termsList, v)
  492. }
  493. query = query.Must(elastic.NewTermsQuery("ChartInfoId", termsList...))
  494. }
  495. // classifyIdList 指定分类下的图表
  496. if len(searchClassifyIdList) > 0 {
  497. termsList := make([]interface{}, 0)
  498. for _, v := range searchClassifyIdList {
  499. termsList = append(termsList, v)
  500. }
  501. query = query.Must(elastic.NewTermsQuery("ChartClassifyId", termsList...))
  502. }
  503. // publicClassifyIdList 指定公共分类下的图表
  504. if len(searchPublicClassifyIdList) > 0 {
  505. termsList := make([]interface{}, 0)
  506. for _, v := range searchPublicClassifyIdList {
  507. termsList = append(termsList, v)
  508. }
  509. query = query.Must(elastic.NewTermsQuery("ChartPublicClassifyId", termsList...))
  510. }
  511. // 图表名称、编码匹配
  512. if keywordStr != `` {
  513. // 默认使用中文名字字段去匹配
  514. keywordNameKey := `ChartName`
  515. query = query.Must(elastic.NewMatchQuery(keywordNameKey, keywordStr))
  516. }
  517. // 图表与用户的权限匹配
  518. {
  519. //图表权限范围,0-全部;1-我的;2-公共
  520. switch chartAuth {
  521. case 1:
  522. // 自己的图表
  523. query = query.Must(elastic.NewTermQuery(`SysUserId`, showSysId))
  524. case 2:
  525. // 公开的图表
  526. query = query.Must(elastic.NewTermQuery(`PublicStatus`, utils.DataPublicSuccess))
  527. default:
  528. tmpShouldQuery := elastic.NewBoolQuery()
  529. // 自己的图表
  530. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermQuery(`SysUserId`, showSysId))
  531. // 分享给我的图表
  532. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermsQuery(`SharedUserIdList`, showSysId))
  533. //公开的图表
  534. tmpShouldQuery = tmpShouldQuery.Should(elastic.NewTermQuery(`PublicStatus`, utils.DataPublicSuccess))
  535. //shouldQuery = shouldQuery.Should(tmpShouldQuery)
  536. query = query.Must(tmpShouldQuery)
  537. }
  538. }
  539. // 排序
  540. sortList := make([]*elastic.FieldSort, 0)
  541. // 如果没有关键字,那么就走图表id倒序
  542. for orderKey, orderType := range sortMap {
  543. switch orderType {
  544. case "asc":
  545. sortList = append(sortList, elastic.NewFieldSort(orderKey).Asc())
  546. case "desc":
  547. sortList = append(sortList, elastic.NewFieldSort(orderKey).Desc())
  548. }
  549. }
  550. return searchChartInfoData(indexName, query, sortList, from, size)
  551. }