We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to implement an elasticsearch-like filter query statement that can query specified fields without calculating scores
{ "query": { "bool": { "must": [ { "match": { "title": "Search" }}, { "match": { "content": "Elasticsearch" }} ], "filter": [ { "term": { "status": "published" }}, { "range": { "publish_date": { "gte": "2015-01-01" }}} ] } } }
The text was updated successfully, but these errors were encountered:
use BooleanQuery: https://pkg.go.dev/github.com/blevesearch/bleve/v2#NewBooleanQuery there is even an usage example in the docs:
must := NewMatchQuery("one") mustNot := NewMatchQuery("great") query := NewBooleanQuery() query.AddMust(must) query.AddMustNot(mustNot) searchRequest := NewSearchRequest(query) searchResults, err := exampleIndex.Search(searchRequest) if err != nil { panic(err) } fmt.Println(searchResults.Hits[0].ID)
Sorry, something went wrong.
No branches or pull requests
How to implement an elasticsearch-like filter query statement that can query specified fields without calculating scores
The text was updated successfully, but these errors were encountered: