Skip to content

shinpei/golr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Golr - Go client library for Apache Solr

Build Status

Golr aims to provide you a fully accessibility to Apache Solr from Go.

Install

go get github.com/shinpei/golr

Usage

import (
    "github.com/shinpei/golr"
    "runtime"
    "fmt"
)
func main () {
	con, _ := golr.Connect("localhost", 8983)
	title := "example"
	textBody := "this is an example"
	d := []Page{{
		Id:        "uniqueKey",
		Title:     title,
		Text:      textBody,
		TextCount: len(textBody),
	},
	}

	opt := &golr.SolrAddOption{
		Concurrency: runtime.NumCPU(),
	}
	msg := <-con.AddDocuments(d, opt)
	fmt.Println(string(msg[:]))
}

Lisence, contact info, contribute

It's under ASL2.0. If you find bug or improvement request, please contact me through twitter, @shinpeintk. And always welcoming heartful pull request.

Cheers, 🍺 🗿

About

Client library for Apache Solr

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages