func (document Document) Doc() map[string]interface{} {
	return document.Fields
}
/*
Document.Doc() returns the raw document (map)
package solr
import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"strings"
)
type Connection struct {
	URL     string
	Version []int
}
type Document struct {
	Fields map[string]interface{}
}
type FacetCount struct {
	Value string
	Count int
}
var facet_chunk_size int = 2
type Facet struct {
	Name   string        
	Counts []FacetCount  
}
type DocumentCollection struct {
	Facets     []Facet
	Collection []Document
	NumFacets  int  
	NumFound   int
	Start      int
}
type SelectResponse struct {
	Results *DocumentCollection
	Status  int
	QTime   int
}
type ErrorResponse struct {
	Message string
	Status  int
}
type UpdateResponse struct {
	Success bool
}
type URLParamMap map[string][]string
type Query struct {
	Params     URLParamMap
	Rows       int
	Start      int
	Sort       string
	DefType    string
	Debug      bool
	OmitHeader bool
}
func (q *Query) String() string {
	s := []string{}
	if len(q.Params) > 0 {
		s = append(s, EncodeURLParamMap(&q.Params))
	}
	if q.Rows != 0 {
		s = append(s, fmt.Sprintf("rows=%d", q.Rows))
	}
	if q.Start != 0 {
		s = append(s, fmt.Sprintf("start=%d", q.Start))
	}
	if q.Sort != "" {
		s = append(s, fmt.Sprintf("sort=%s", q.Sort))
	}
	if q.DefType != "" {
		s = append(s, fmt.Sprintf("defType=%s", q.DefType))
	}
	if q.Debug {
		s = append(s, fmt.Sprintf("debugQuery=true"))
	}
	if q.OmitHeader {
		s = append(s, fmt.Sprintf("omitHeader=true"))
	}
	return strings.Join(s, "&")
}
func (d *DocumentCollection) Get(i int) *Document {
	return &d.Collection[i]
}
func (d *DocumentCollection) Len() int {
	return len(d.Collection)
}
func (document Document) Field(field string) interface{} {
	r, _ := document.Fields[field]
	return r
}