mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 04:22:22 +00:00
ch6-4-fix typos
This commit is contained in:
parent
cc265b8fcc
commit
1c27a9fe46
@ -242,7 +242,7 @@ func insertDocument(db string, table string, obj map[string]interface{}) {
|
||||
|
||||
```go
|
||||
func query(indexName string, typeName string) (*elastic.SearchResult, error) {
|
||||
// 通过 bool must 和 bool shoud 添加 bool 查询条件
|
||||
// 通过 bool must 和 bool should 添加 bool 查询条件
|
||||
q := elastic.NewBoolQuery().Must(elastic.NewMatchPhraseQuery("id", 1),
|
||||
elastic.NewBoolQuery().Must(elastic.NewMatchPhraseQuery("male", "m")))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user