solar

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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) AddDocuments

func (ss *SolrService) AddDocuments(collection string, commit bool, docs ...solr.Document) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL