Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vanng822/go-solr
Solr client in Go, core admin, add docs, update, delete, search and more
https://github.com/vanng822/go-solr
golang solr solr-client
Last synced: 2 days ago
JSON representation
Solr client in Go, core admin, add docs, update, delete, search and more
- Host: GitHub
- URL: https://github.com/vanng822/go-solr
- Owner: vanng822
- License: mit
- Created: 2014-07-04T22:25:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T18:30:30.000Z (9 months ago)
- Last Synced: 2025-01-10T08:18:00.614Z (9 days ago)
- Topics: golang, solr, solr-client
- Language: Go
- Homepage:
- Size: 180 KB
- Stars: 69
- Watchers: 9
- Forks: 42
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solr - go-solr - Solr client in Go, core admin, add docs, update, delete, search and more. (Clients / Go)
README
go-solr
=======[![Build Status](https://travis-ci.org/vanng822/go-solr.svg?branch=master)](https://travis-ci.org/vanng822/go-solr)
[![GoDoc](https://godoc.org/github.com/vanng822/go-solr/solr?status.svg)](https://godoc.org/github.com/vanng822/go-solr/solr)
[![Go Walker](http://gowalker.org/api/v1/badge)](https://gowalker.org/github.com/vanng822/go-solr/solr) [![](http://gocover.io/_badge/github.com/vanng822/go-solr/solr)](http://gocover.io/github.com/vanng822/go-solr/solr)Solr v4, required v4.4 if you want use all supported features.
Json only
No schema checking
Please go to http://wiki.apache.org/solr/ for how to write solr query.
## Features
Search, Add, Update, Delete, Commit, Rollback, Optimize
Core admin, Schema REST API
## Install
go get github.com/vanng822/go-solr/solr
## Usage
package main
import (
"github.com/vanng822/go-solr/solr"
"fmt"
)
func main() {
si, _ := solr.NewSolrInterface("http://localhost:8983/solr", "collection1")
query := solr.NewQuery()
query.Q("*:*")
s := si.Search(query)
r, _ := s.Result(nil)
fmt.Println(r.Results.Docs)
}
## Developersexport MOCK_LOGGING=1
for the mock logging
unset MOCK_LOGGING
to remove this environment variable
## License
MIT