项目作者: vanng822

项目描述 :
Solr client in Go, core admin, add docs, update, delete, search and more
高级语言: Go
项目地址: git://github.com/vanng822/go-solr.git
创建时间: 2014-07-04T22:25:46Z
项目社区:https://github.com/vanng822/go-solr

开源协议:MIT License

下载


go-solr

Build Status
GoDoc
Go Walker

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

  1. package main
  2. import (
  3. "github.com/vanng822/go-solr/solr"
  4. "fmt"
  5. )
  6. func main() {
  7. si, _ := solr.NewSolrInterface("http://localhost:8983/solr", "collection1")
  8. query := solr.NewQuery()
  9. query.Q("*:*")
  10. s := si.Search(query)
  11. r, _ := s.Result(nil)
  12. fmt.Println(r.Results.Docs)
  13. }

Developers

  1. export MOCK_LOGGING=1

for the mock logging

  1. unset MOCK_LOGGING

to remove this environment variable

License

MIT