func (si *SolrInterface) Ping() (status string, qtime int, err error) {
	r, err := HTTPGet(fmt.Sprintf("%s/%s/admin/ping?wt=json", si.conn.url.String(), si.conn.core), nil, si.conn.username, si.conn.password, 0)
	if err != nil {
		return "", -1, err
	}
	resp, err := bytes2json(&r)
	if err != nil {
		return "", -1, err
	}
	status, ok := resp["status"].(string)
	if ok == false {
		return "", -1, fmt.Errorf("Unexpected response returned")
	}
	if QTime, ok := resp["responseHeader"].(map[string]interface{})["QTime"].(float64); ok {
		qtime = int(QTime)
	} else {
		qtime = -1
	}
	return status, qtime, nil
}
Return 'status' and QTime from solr, if everything is fine status should have value 'OK'
QTime will have value -1 if can not determine
package solr
import (
	"encoding/json"
	"fmt"
	"math"
	"net/url"
	"time"
)
type M map[string]interface{}
type Document map[string]interface{}
func (d Document) Has(k string) bool {
	_, ok := d[k]
	return ok
}
func (d Document) Get(k string) interface{} {
	v, _ := d[k]
	return v
}
func (d Document) Set(k string, v interface{}) {
	d[k] = v
}
type SolrResponse struct {
	Status   int
	Response map[string]interface{}
}
type SolrUpdateResponse struct {
	Success bool
	Result  map[string]interface{}
}
type FireworkCollection struct {
	Docs     *json.RawMessage
	Start    int
	NumFound int
}
type FireworkSolrResult struct {
	Status  int                 
	Results FireworkCollection `json:"response"`  
	QTime   int
	Params  map[string]string `json:"params"`
	ResponseHeader map[string]interface{}
	FacetCounts    map[string]interface{}
	Highlighting   map[string]interface{}
	Error          map[string]interface{}
	Grouped        map[string]interface{}  
	Stats          map[string]interface{}
	MoreLikeThis   map[string]interface{}  
	NextCursorMark string                 `json:"nextCursorMark"`
}
type Collection struct {
	Docs     []Document
	Start    int
	NumFound int
}
type SolrResult struct {
	Status         int          
	Results        *Collection  
	QTime          int
	ResponseHeader map[string]interface{}
	Facets         map[string]interface{}
	JsonFacets     map[string]interface{}
	FacetCounts    map[string]interface{}
	Highlighting   map[string]interface{}
	Error          map[string]interface{}
	Grouped        map[string]interface{}  
	Stats          map[string]interface{}
	MoreLikeThis   map[string]interface{}  
	SpellCheck     map[string]interface{}  
	NextCursorMark string
}
type SolrMltResult struct {
	Status         int          
	Results        *Collection  
	Match          *Collection  
	ResponseHeader map[string]interface{}
	Error          map[string]interface{}
}
type SolrRealtimeGetResult struct {
	Results *Collection
}
type SolrInterface struct {
	conn *Connection
}
func NewSolrInterface(solrUrl, core string) (*SolrInterface, error) {
	c, err := NewConnection(solrUrl, core)
	if err != nil {
		return nil, err
	}
	return &SolrInterface{conn: c}, nil
}
func (si *SolrInterface) SetCore(core string) {
	si.conn.SetCore(core)
}
func (si *SolrInterface) SetTimeout(timeout time.Duration) {
	si.conn.SetTimeout(timeout)
}
func (si *SolrInterface) SetBasicAuth(username, password string) {
	si.conn.SetBasicAuth(username, password)
}
func (si *SolrInterface) Search(q *Query) *Search {
	return NewSearch(si.conn, q)
}
func makeAddChunks(docs []Document, chunk_size int) []map[string]interface{} {
	if chunk_size < 1 {
		chunk_size = 100
	}
	docs_len := len(docs)
	num_chunk := int(math.Ceil(float64(docs_len) / float64(chunk_size)))
	doc_counter := 0
	chunks := make([]map[string]interface{}, num_chunk)
	for i := 0; i < num_chunk; i++ {
		add := make([]Document, 0, chunk_size)
		for j := 0; j < chunk_size; j++ {
			if doc_counter >= docs_len {
				break
			}
			add = append(add, docs[doc_counter])
			doc_counter++
		}
		chunks[i] = M{"add": add}
	}
	return chunks
}
func (si *SolrInterface) Add(docs []Document, chunk_size int, params *url.Values) (*SolrUpdateResponse, error) {
	result := &SolrUpdateResponse{Success: true}
	responses := M{}
	chunks := makeAddChunks(docs, chunk_size)
	for i := 0; i < len(chunks); i++ {
		res, err := si.Update(chunks[i], params)
		if err != nil {
			return nil, err
		}
		result.Success = result.Success && res.Success
		responses[fmt.Sprintf("chunk_%d", i+1)] = M{
			"result":  res.Result,
			"success": res.Success,
			"total":   len(chunks[i]["add"].([]Document))}
	}
	result.Result = responses
	return result, nil
}
func (si *SolrInterface) Delete(data map[string]interface{}, params *url.Values) (*SolrUpdateResponse, error) {
	message := M{"delete": data}
	return si.Update(message, params)
}
func (si *SolrInterface) DeleteAll() (*SolrUpdateResponse, error) {
	params := &url.Values{}
	params.Add("commit", "true")
	return si.Delete(M{"query": "*:*"}, params)
}
func (si *SolrInterface) Update(data interface{}, params *url.Values) (*SolrUpdateResponse, error) {
	if si.conn == nil {
		return nil, fmt.Errorf("No connection found for making request to solr")
	}
	return si.conn.Update(data, params)
}
func (si *SolrInterface) Commit() (*SolrUpdateResponse, error) {
	params := &url.Values{}
	params.Add("commit", "true")
	return si.Update(M{}, params)
}
func (si *SolrInterface) SoftCommit() (*SolrUpdateResponse, error) {
	params := &url.Values{}
	params.Add("commit", "true")
	params.Add("softCommit", "true")
	return si.Update(M{}, params)
}
func (si *SolrInterface) Optimize(params *url.Values) (*SolrUpdateResponse, error) {
	if params == nil {
		params = &url.Values{}
	}
	params.Set("optimize", "true")
	return si.Update(M{}, params)
}
func (si *SolrInterface) Rollback() (*SolrUpdateResponse, error) {
	return si.Update(M{"rollback": M{}}, nil)
}
func (si *SolrInterface) CoreAdmin() (*CoreAdmin, error) {
	ca, err := NewCoreAdmin(si.conn.url.String())
	if err != nil {
		return nil, err
	}
	ca.SetBasicAuth(si.conn.username, si.conn.password)
	return ca, nil
}
func (si *SolrInterface) Schema() (*Schema, error) {
	s, err := NewSchema(si.conn.url.String(), si.conn.core)
	if err != nil {
		return nil, err
	}
	s.SetBasicAuth(si.conn.username, si.conn.password)
	return s, nil
}