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
[x] elastic.v6 (for Elasticsearch 6.x)
client with http proxy should work well.
but all settings are omitted
proxyUrl, _ := url.Parse("http://proxyIP1:48888") client, err := elastic.NewClient( elastic.SetURL("http://esNode01:9200"), elastic.SetSniff(false), elastic.SetHttpClient( &http.Client{ Transport: &http.Transport{ MaxIdleConnsPerHost: 10, Proxy: http.ProxyURL(proxyUrl), }, Timeout: 10 * time.Second, }), ) if err != nil { log.Printf("err: %v", err) return } query := elastic.NewBoolQuery() termQuery := elastic.NewTermQuery("term1", "termValue1") rangeQuery := elastic.NewRangeQuery("@timestamp").Gte(time.Now().Add(-48 * time.Hour)).Lte(time.Now().Add(-24 * time.Hour)) query = query.Must(termQuery, rangeQuery) searchResult, err := client.Search(). Index("index01*"). Query(query). From(0).Size(1). Pretty(true). Do(context.Background()) if err != nil { log.Printf("search err: %v", err) return } log.Printf("%+v", len(searchResult.Hits.Hits))
result should be 1, but 10
it seems that not condition passed when use Proxy~
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which version of Elastic are you using?
[x] elastic.v6 (for Elasticsearch 6.x)
Please describe the expected behavior
client with http proxy should work well.
Please describe the actual behavior
but all settings are omitted
Any steps to reproduce the behavior?
result should be 1, but 10
it seems that not condition passed when use Proxy~
The text was updated successfully, but these errors were encountered: