Open alexu84 opened 3 years ago
Add support to pass standard context.Context to Search and other functions in order to handle cancellations and graceful shutdowns properly.
Sample use:
package main import ( "context" "github.com/vanng822/go-solr/solr" "fmt" ) func main() { ctx := context.Background() si, _ := solr.NewSolrInterfaceWithCtx(ctx, "http://localhost:8983/solr", "collection1") query := solr.NewQuery() query.Q("*:*") s := si.SearchWithCtx(ctx, query) r, _ := s.Result(nil) fmt.Println(r.Results.Docs) }
Add support to pass standard context.Context to Search and other functions in order to handle cancellations and graceful shutdowns properly.
Sample use: