1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| package esutil
|
| import (
| "errors"
| "strconv"
| )
|
| func DbPersoninfos( queryindex int, querynums int ) (dbpersoninfos []Baseinfo, err error){
| point := strconv.Itoa(queryindex)
| number := strconv.Itoa(querynums)
|
| var dbinfoRequest = ` {
| "from": ` + point + `,
| "query": {
| "match_all": {}
| },
| "size":`+ number +`,
| "_source": [
| "tableId",
| "tableName",
| "compareScore",
| "personId",
| "personName",
| "personPicUrl",
| "phoneNum",
| "sex",
| "idCard",
| "monitorLevel",
| "faceFeature",
| "content",
| "id"
| ]
| }`
|
| buf, err := GetDbinfo(dbinfoRequest )
| if err != nil {
| return nil ,errors.New("http request get dbperson info is err!")
| }
| sources, err := Sourcelist(buf)
| if err != nil {
| return nil,err
| }
| dbpersoninfos = Parsesources(sources)
| return dbpersoninfos, nil
| }
|
|