Documentation ¶
Index ¶
- type AddField
- type Field
- type SolrService
- func (ss *SolrService) AddDocument(collection string, commit bool, doc *solr.Document) error
- func (ss *SolrService) AddDocuments(collection string, commit bool, docs ...solr.Document) error
- func (ss *SolrService) AddNewField(collection, name, fieldType string, ...) error
- func (ss *SolrService) CreateCollection(collection, configSet string, numShards, replicationFactor int) error
- func (ss *SolrService) DeleteCollection(collection string) error
- func (ss *SolrService) DeleteDocumentByID(collection string, commit bool, id string) error
- func (ss *SolrService) DeleteDocumentByQuery(collection string, commit bool, query string) error
- func (ss *SolrService) Facets(collection, query, fields string, start, rows int, filterQueries []string, ...) (*solr.SolrResult, error)
- func (ss *SolrService) FilteredQuery(collection, query, fields string, start, rows int, filterQueries []string) (*solr.SolrResult, error)
- func (ss *SolrService) ListCollections() ([]string, error)
- func (ss *SolrService) SimpleQuery(collection, query, fields string, start, rows int) (*solr.SolrResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddField ¶
type AddField struct {
Field Field `json:"add-field"`
}
AddField - the json struct to add a field to solr schema
type Field ¶
type Field struct { Name string `json:"name"` FieldType string `json:"type"` MultiValued bool `json:"multiValued"` Stored bool `json:"stored"` Indexed bool `json:"indexed"` DocValues bool `json:"docValues"` }
Field - a solr schema field
type SolrService ¶
type SolrService struct {
// contains filtered or unexported fields
}
SolrService - struct
func NewSolrService ¶
func NewSolrService(url string, logger *zap.Logger) (*SolrService, error)
NewSolrService - creates a new instance
func (*SolrService) AddDocument ¶ added in v1.27.0
AddDocument - add one document to the solr collection
func (*SolrService) AddDocuments ¶
AddDocuments - add one or more documentos to the solr collection
func (*SolrService) AddNewField ¶
func (ss *SolrService) AddNewField(collection, name, fieldType string, multiValued, stored, indexed, docValues bool) error
AddNewField - adds a new field to solr schema
func (*SolrService) CreateCollection ¶
func (ss *SolrService) CreateCollection(collection, configSet string, numShards, replicationFactor int) error
CreateCollection - creates a new collection
func (*SolrService) DeleteCollection ¶
func (ss *SolrService) DeleteCollection(collection string) error
DeleteCollection - deletes a collection
func (*SolrService) DeleteDocumentByID ¶ added in v1.8.0
func (ss *SolrService) DeleteDocumentByID(collection string, commit bool, id string) error
DeleteDocumentByID - delete a document by ID
func (*SolrService) DeleteDocumentByQuery ¶ added in v1.8.0
func (ss *SolrService) DeleteDocumentByQuery(collection string, commit bool, query string) error
DeleteDocumentByQuery - delete document by query
func (*SolrService) Facets ¶
func (ss *SolrService) Facets(collection, query, fields string, start, rows int, filterQueries []string, facetFields, childrenFacetFields []string, blockJoin bool, facetLimit, minCount int) (*solr.SolrResult, error)
Facets - get facets from solr
func (*SolrService) FilteredQuery ¶
func (ss *SolrService) FilteredQuery(collection, query, fields string, start, rows int, filterQueries []string) (*solr.SolrResult, error)
FilteredQuery - queries the solr
func (*SolrService) ListCollections ¶
func (ss *SolrService) ListCollections() ([]string, error)
ListCollections - list all collections
func (*SolrService) SimpleQuery ¶
func (ss *SolrService) SimpleQuery(collection, query, fields string, start, rows int) (*solr.SolrResult, error)
SimpleQuery - queries the solr
Click to show internal directories.
Click to hide internal directories.