modulepackage
2.1.4-alpha.2
Repository: https://github.com/hguenther/go-solr.git
Documentation: pkg.go.dev
# README
go-solr
solr go client from Sendgrid
Usage
To start the client
solrzk := solr.NewSolrZK(...)
solrzk.Listen()
solrhttp := solr.NewSolrHttp(solrzk)
solrClient := solr.NewSolrHttpRetrier(solrhttp)
The Read and Update methods take a node list use the SolrLocator interface to return a node list
locator := solr.GetSolrLocator(solr.NewSolrZK(...))
type SolrLocator interface {
GetLeaders(docID string) ([]string, error)
GetReplicaUris() ([]string, error)
GetReplicasFromRoute(route string) ([]string, error)
GetLeadersAndReplicas(docID string) ([]string, error)
}
To make requests
solrClient.Select(locator.GetReplicasFromRoute("shard!"),solr.FilterQuery("myfield:test"),solr.Route("shardkey!"))
To make updates
solrClient.Update(locator.GetLeadersAndReplicas("{anydocidtoroute}"),collectionName,callsSolrJsonDocs, docsMap)
Tests on solr
docker-compose up
docker-compose run gotests bash
go test
go run ./cmd/solrRunner.go 1000
Tests with cluster of 3 solrs
docker-compose -p cluster -f docker-compose.cluster.yml up
docker-compose -p cluster run gotests bash
go test
go run ./cmd/solrRunner.go 1000
License
# Packages
No description provided by the author
# Functions
The path to tls certificate (optional).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultRows sets number of rows for paginationin calls that don't pass a number of rows in.
No description provided by the author
Helper funcs for setting the solr query params.
No description provided by the author
No description provided by the author
No description provided by the author
HTTPClient sets the HTTPer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HttpError - An Error due to a http response >= 400.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author