s

package
v0.0.0-...-f74767b Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

Bleve implementation

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFileMode = 0755
)

Functions

func BuildIndexMapping

func BuildIndexMapping() (mapping.IndexMapping, error)

func Init

func Init(directoryPath string) (*bleve.Index, error)

Types

type BIndex

type BIndex struct {
	BIndex *bleve.Index
	Closed bool
}

func (BIndex) BatchIndex

func (i BIndex) BatchIndex(batchSize int, items []KVPlets) error

func (BIndex) Index

func (i BIndex) Index(item KVPlets) error

type Error

type Error int

Error represents a more strongly typed bleve error for detecting and handling specific types of errors.

const (
	ErrorBoneIndexErrorOnInit Error = iota
)

Constant Error values which can be compared to determine the type of error

func (Error) Error

func (e Error) Error() string

type Indexer

type Indexer interface {
	Index(plets KVPlets) error
	BatchIndex(...KVPlets) error
}

type KVPlets

type KVPlets struct {
	Prefix string `json:"prefix"`
	NPlet  NPlet  `json:"nplet"`
}

type NPlet

type NPlet struct {
	Subject   string `json:"subject"`
	Predicate string `json:"predicate"`
	Object    string `json:"object"`
}

Jump to

Keyboard shortcuts

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