package
module
Version:
v0.0.0-...-3e4420a
Opens a new window with list of versions in this module.
Published: Oct 27, 2018
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
¶
glsolr

glsolr is the lightweight golang library wrapper for some functionality of Solr API.
Feauteres
- Select query.
- Cursor select query.
License
glsolr
is released under the MIT License. See LICENSE.
Documentation
¶
-
func CursorSelect(cLink, user, passw string, params url.Values, headers map[string]string, ...) (<-chan interface{}, error)
-
type Response
-
func Select(cLink, user, passw string, params url.Values, headers map[string]string, ...) (solrResp *Response, err error)
-
func Update(cLink, user, passw string, data io.Reader, params url.Values, ...) (solrResp *Response, err error)
CursorSelect returns generator as channel to receive results of a cursor select query or error
type Response struct {
ZkConnected bool `json:"zkConnected"`
Status int `json:"status"`
QTime int `json:"QTime"`
Params struct {
Q string `json:"q"`
Fl string `json:"fl"`
CursorMark string `json:"cursorMark"`
Sort string `json:"sort"`
Rows string `json:"rows"`
Start string `json:"start"`
} `json:"params"`
} `json:"responseHeader"`
Error struct {
Msg string `json:"msg"`
Trace string `json:"trace"`
} `json:"error"`
Response struct {
NumFound int64 `json:"numFound"`
Start int64 `json:"start"`
Docs []json.RawMessage `json:"docs"`
} `json:"response"`
NextCursorMark string `json:"nextCursorMark"`
Highlighting json.RawMessage `json:"highlighting"`
}
Response realizes format of Solr response
Select makes select request to a Solr collection
Update func makes update request to a Solr collection
Source Files
¶
Click to show internal directories.
Click to hide internal directories.