https://github.com/droxer/gosolr
Apache Solr client implementation by go.
https://github.com/droxer/gosolr
Last synced: 9 months ago
JSON representation
Apache Solr client implementation by go.
- Host: GitHub
- URL: https://github.com/droxer/gosolr
- Owner: droxer
- Created: 2014-11-20T07:24:01.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-30T09:34:47.000Z (almost 11 years ago)
- Last Synced: 2025-01-09T17:46:41.985Z (over 1 year ago)
- Language: Go
- Size: 163 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gosolr [](https://godoc.org/github.com/droxer/gosolr)
[](https://travis-ci.org/droxer/gosolr)
Apache Solr client implementation by go.
This is **draft** implementation for now. Contribute is more than welcome.
## Example Usage
```go
package main
import (
"fmt"
"github.com/droxer/gosolr"
"log"
"time"
)
func main() {
solr := gosolr.New("http://localhost:8983/solr/collection1", time.Second*5)
var doc = &gosolr.Document{
Doc: map[string]interface{}{
"documentid": 118523475,
"audiences": []string{"gosolr"},
"collapse_id": 8888,
},
}
resp, _ := solr.Add(doc, true, false)
log.Print(fmt.Sprintf("Status: %v", resp.Header.Status))
}
```
## License
Copyright 2014
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.