feat:完善项目信息
This commit is contained in:
@ -87,11 +87,12 @@ func TestNewInstance2(t *testing.T) {
|
||||
|
||||
service := client.Search().Index("es_patent_index")
|
||||
|
||||
result, err := service.Pretty(true).Query(query).Do(context.Background())
|
||||
result, err := service.From(1).Size(1).TrackTotalHits(true).Pretty(true).Query(query).Do(context.Background())
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
t.Log(utils.AnyToJSON(result.Hits.TotalHits.Value))
|
||||
for _, v := range result.Hits.Hits {
|
||||
t.Log(string(v.Source))
|
||||
}
|
||||
|
Reference in New Issue
Block a user