solar

package
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: GPL-3.0 Imports: 8 Imported by: 1

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 *zerolog.Logger) (*SolrService, error)

NewSolrService - creates a new instance

func (*SolrService) AddDocument added in v1.27.0

func (ss *SolrService) AddDocument(collection string, commit bool, doc *solr.Document) error

AddDocument - add one document to the solr collection

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