Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eramus/solr
basic solr client
https://github.com/eramus/solr
Last synced: 7 days ago
JSON representation
basic solr client
- Host: GitHub
- URL: https://github.com/eramus/solr
- Owner: eramus
- Created: 2012-04-25T22:23:50.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-04-25T23:06:56.000Z (almost 13 years ago)
- Last Synced: 2024-11-28T11:08:59.915Z (2 months ago)
- Language: Go
- Size: 93.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# solr
not much here. just needed something quick to wrap the http calls# example
type Doc struct {
Id int `json:"id"`
Keywords string `json:"keywords"`
}s := solr.New("localhost", 8080, "posts")
// put some docs in
docs := make([]interface{}, 1)
docs[0] = Doc{12345, "cars car vehicle"}
res, err := s.Update(docs)
log.Println("ERR:", err, "\nRESP:", res)// get some docs out
res, err = s.Query("post:car")
log.Println("ERR:", err, "\nRESP:", res)# todo
add some sorting and limiting abilities to Query()
do something about the return from Query() -- good enough for now