bluge

package
v0.0.0-...-ca3ac9b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package bluge this package contains all things related to the bluge fulltext index engine. see: https://github.com/blugelabs/bluge

Index

Constants

View Source
const BlugeIndex = "bluge"

BlugeIndex name of the index engine

Variables

This section is empty.

Functions

func CloseBluge

func CloseBluge()

CloseBluge just for the sake of completeness

func InitBluge

func InitBluge(p map[string]any) error

InitBluge initialise the main engine, mainly retriving and storing the configuration

Types

type Config

type Config struct {
	Rootpath string `yaml:"rootpath"`
}

Config the config for the indexer

type Index

type Index struct {
	Tenant string
	// contains filtered or unexported fields
}

Index a tenant based single indexer

func (*Index) Index

func (m *Index) Index(_ string, b model.BlobDescription) error

Index the index will index a single document, be aware this will only work in a single instance installation. the implementation will check, if the index writer is already opened and wait til it's closed, but only in a single instance of the blob storage. So in a multinode enviroment this will fail.

func (*Index) Init

func (m *Index) Init() error

Init initialise a index service for a tenant

func (*Index) NewBatch

func (m *Index) NewBatch() interfaces.IndexBatch

NewBatch creating a new batch job for indexing

func (*Index) Search

func (m *Index) Search(qry string, callback func(id string) bool) error

Search doing a search for a tenant

type IndexBatch

type IndexBatch struct {
	// contains filtered or unexported fields
}

IndexBatch for bulk indexing

func (*IndexBatch) Add

Add adding a description to the batch

func (*IndexBatch) Index

func (i *IndexBatch) Index() error

Index indexing the batch

Jump to

Keyboard shortcuts

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