func (si *SolrInterface) DeleteAll() (*SolrUpdateResponse, error) {
	params := &url.Values{}
	params.Add("commit", "true")
	return si.Delete(M{"query": "*:*"}, params)
}
DeleteAll will remove all documents and commit
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)
}