Versions in this module Expand all Collapse all v0 v0.10.0 Feb 19, 2020 Changes in this version + const VERSION + var MaximumSolrUrlLengthSupported = 2083 + func HTTPGet(url string, headers [][]string, username, password string, ...) ([]byte, error) + func HTTPPost(path string, data *[]byte, headers [][]string, username, password string, ...) ([]byte, error) + func ParseDocResponse(docResponse map[string]interface{}, collection *Collection) + type Collection struct + Docs []Document + NumFound int + Start int + type Connection struct + func NewConnection(solrUrl, core string) (*Connection, error) + func (c *Connection) AddHeader(key, value string) + func (c *Connection) Resource(source string, params *url.Values) (*[]byte, error) + func (c *Connection) SetBasicAuth(username, password string) + func (c *Connection) SetCore(core string) + func (c *Connection) SetTimeout(timeout time.Duration) + func (c *Connection) Update(data interface{}, params *url.Values) (*SolrUpdateResponse, error) + type CoreAdmin struct + func NewCoreAdmin(solrUrl string) (*CoreAdmin, error) + func (ca *CoreAdmin) Action(action string, params *url.Values) (*SolrResponse, error) + func (ca *CoreAdmin) Get(path string, params *url.Values) (*SolrResponse, error) + func (ca *CoreAdmin) Reload(core string) (*SolrResponse, error) + func (ca *CoreAdmin) Rename(core, other string) (*SolrResponse, error) + func (ca *CoreAdmin) SetBasicAuth(username, password string) + func (ca *CoreAdmin) Split(core string, targetCore ...string) (*SolrResponse, error) + func (ca *CoreAdmin) Status(core string) (*SolrResponse, error) + func (ca *CoreAdmin) Swap(core, other string) (*SolrResponse, error) + func (ca *CoreAdmin) Unload(core string) (*SolrResponse, error) + type Document map[string]interface + func (d Document) Get(k string) interface{} + func (d Document) Has(k string) bool + func (d Document) Set(k string, v interface{}) + type ExtensiveResultParser struct + func (parser *ExtensiveResultParser) Parse(resp_ *[]byte) (*SolrResult, error) + func (parser *ExtensiveResultParser) ParseError(response *SolrResponse, sr *SolrResult) + func (parser *ExtensiveResultParser) ParseFacets(response *SolrResponse, sr *SolrResult) + func (parser *ExtensiveResultParser) ParseJsonFacets(response *SolrResponse, sr *SolrResult) + func (parser *ExtensiveResultParser) ParseResponse(response *SolrResponse, sr *SolrResult) (err error) + func (parser *ExtensiveResultParser) ParseResponseHeader(response *SolrResponse, sr *SolrResult) + type FireworkCollection struct + Docs *json.RawMessage + NumFound int + Start int + type FireworkResultParser struct + func (parser *FireworkResultParser) Parse(resp *[]byte) (FireworkSolrResult, error) + type FireworkSolrResult struct + Error map[string]interface{} + FacetCounts map[string]interface{} + Grouped map[string]interface{} + Highlighting map[string]interface{} + MoreLikeThis map[string]interface{} + NextCursorMark string + Params map[string]string + QTime int + ResponseHeader map[string]interface{} + Results FireworkCollection + Stats map[string]interface{} + Status int + type M map[string]interface + type MltResultParser interface + Parse func(*[]byte) (*SolrMltResult, error) + type MoreLikeThisParser struct + func (parser *MoreLikeThisParser) Parse(resp_ *[]byte) (*SolrMltResult, error) + type Query struct + func NewQuery() *Query + func (q *Query) AddFacet(f string) + func (q *Query) AddFacetPivot(f string) + func (q *Query) AddFacetQuery(fq string) + func (q *Query) AddJsonFacet(jf string) + func (q *Query) AddParam(k, v string) + func (q *Query) BoostFunctions(bf string) + func (q *Query) BoostQuery(bq string) + func (q *Query) DefType(defType string) + func (q *Query) FieldList(fl string) + func (q *Query) FilterQuery(fq string) + func (q *Query) Geofilt(latitude, longitude float64, sfield string, distance float64) + func (q *Query) GetParam(k string) string + func (q *Query) QueryFields(qf string) + func (q *Query) RemoveParam(k string) + func (q *Query) Rows(rows int) + func (q *Query) SetFacetMinCount(mc int) + func (q *Query) SetFacetPivotMinCount(mc int) + func (q *Query) SetParam(k, v string) + func (q *Query) Sort(sort string) + func (q *Query) Start(start int) + func (q *Query) String() string + func (qq *Query) Q(q string) + type RealTimeGetParser struct + func (parser *RealTimeGetParser) Parse(resp_ *[]byte) (*SolrRealtimeGetResult, error) + type RealTimeGetResultParser interface + Parse func(*[]byte) (*SolrRealtimeGetResult, error) + type ResultParser interface + Parse func(resp *[]byte) (*SolrResult, error) + type Schema struct + func NewSchema(solrUrl, core string) (*Schema, error) + func (s *Schema) All() (*SolrResponse, error) + func (s *Schema) DynamicFields(fl string, showDefaults bool) (*SolrResponse, error) + func (s *Schema) DynamicFieldsName(name string, showDefaults bool) (*SolrResponse, error) + func (s *Schema) Fields(fl string, includeDynamic, showDefaults bool) (*SolrResponse, error) + func (s *Schema) FieldsName(name string, includeDynamic, showDefaults bool) (*SolrResponse, error) + func (s *Schema) Fieldtypes(showDefaults bool) (*SolrResponse, error) + func (s *Schema) FieldtypesName(name string, showDefaults bool) (*SolrResponse, error) + func (s *Schema) Get(path string, params *url.Values) (*SolrResponse, error) + func (s *Schema) Name() (*SolrResponse, error) + func (s *Schema) Post(path string, data interface{}) (*SolrUpdateResponse, error) + func (s *Schema) SetBasicAuth(username, password string) + func (s *Schema) SetCore(core string) + func (s *Schema) Uniquekey() (*SolrResponse, error) + func (s *Schema) Version() (*SolrResponse, error) + type Search struct + Debug string + func NewSearch(c *Connection, q *Query) *Search + func (s *Search) MoreLikeThis(parser MltResultParser) (*SolrMltResult, error) + func (s *Search) QueryParams() *url.Values + func (s *Search) QueryString() string + func (s *Search) RealTimeGet(parser RealTimeGetResultParser) (*SolrRealtimeGetResult, error) + func (s *Search) Resource(resource string, params *url.Values) (*[]byte, error) + func (s *Search) Result(parser ResultParser) (*SolrResult, error) + func (s *Search) SetQuery(q *Query) + func (s *Search) SpellCheck(parser ResultParser) (*SolrResult, error) + type SolrInterface struct + func NewSolrInterface(solrUrl, core string) (*SolrInterface, error) + func (si *SolrInterface) Add(docs []Document, chunk_size int, params *url.Values) (*SolrUpdateResponse, error) + func (si *SolrInterface) Commit() (*SolrUpdateResponse, error) + func (si *SolrInterface) CoreAdmin() (*CoreAdmin, error) + func (si *SolrInterface) Delete(data map[string]interface{}, params *url.Values) (*SolrUpdateResponse, error) + func (si *SolrInterface) DeleteAll() (*SolrUpdateResponse, error) + func (si *SolrInterface) Optimize(params *url.Values) (*SolrUpdateResponse, error) + func (si *SolrInterface) Ping() (status string, qtime int, err error) + func (si *SolrInterface) Rollback() (*SolrUpdateResponse, error) + func (si *SolrInterface) Schema() (*Schema, error) + func (si *SolrInterface) Search(q *Query) *Search + func (si *SolrInterface) SetBasicAuth(username, password string) + func (si *SolrInterface) SetCore(core string) + func (si *SolrInterface) SetTimeout(timeout time.Duration) + func (si *SolrInterface) SoftCommit() (*SolrUpdateResponse, error) + func (si *SolrInterface) Update(data interface{}, params *url.Values) (*SolrUpdateResponse, error) + type SolrMltResult struct + Error map[string]interface{} + Match *Collection + ResponseHeader map[string]interface{} + Results *Collection + Status int + type SolrRealtimeGetResult struct + Results *Collection + type SolrResponse struct + Response map[string]interface{} + Status int + type SolrResult struct + Error map[string]interface{} + FacetCounts map[string]interface{} + Facets map[string]interface{} + Grouped map[string]interface{} + Highlighting map[string]interface{} + JsonFacets map[string]interface{} + MoreLikeThis map[string]interface{} + NextCursorMark string + QTime int + ResponseHeader map[string]interface{} + Results *Collection + SpellCheck map[string]interface{} + Stats map[string]interface{} + Status int + type SolrUpdateResponse struct + Result map[string]interface{} + Success bool + type StandardResultParser struct + func (parser *StandardResultParser) Parse(resp_ *[]byte) (*SolrResult, error) + func (parser *StandardResultParser) ParseError(response *SolrResponse, sr *SolrResult) + func (parser *StandardResultParser) ParseFacetCounts(response *SolrResponse, sr *SolrResult) + func (parser *StandardResultParser) ParseHighlighting(response *SolrResponse, sr *SolrResult) + func (parser *StandardResultParser) ParseMoreLikeThis(response *SolrResponse, sr *SolrResult) + func (parser *StandardResultParser) ParseResponse(response *SolrResponse, sr *SolrResult) (err error) + func (parser *StandardResultParser) ParseResponseHeader(response *SolrResponse, sr *SolrResult) + func (parser *StandardResultParser) ParseSpellCheck(response *SolrResponse, sr *SolrResult) + func (parser *StandardResultParser) ParseStats(response *SolrResponse, sr *SolrResult)