solr

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCollectionNotFound is returned by any operation if the target
	// collection isn't found.
	ErrCollectionNotFound = errors.New(`solr: the specified collection was not found`)
)

Functions

func Index

func Index(collection string, docs documents) error

Index will send a batch of documents to Solr for upsertion.

func Init

func Init(opts *Options) error

Init will initialize the Solr client. If an error is returned, Solr isn't available or configured properly.

func Ping

func Ping() error

Ping will check if Solr is running. If there's any issue, a non-nil error will be returned.

Types

type Options

type Options struct {
	Host       string
	Port       string
	Collection string
}

Options are configuration settings for Solr.

Jump to

Keyboard shortcuts

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