indexer

package
v0.0.0-...-166fa37 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentParser

type DocumentParser interface {
	Start(chan<- redisearch.Document) error
	Stop()
}

func NewSingleFileReader

func NewSingleFileReader(name string, opener DocumentReaderOpener) DocumentParser

type DocumentReader

type DocumentReader interface {
	Read() (redisearch.Document, error)
}

type DocumentReaderOpener

type DocumentReaderOpener interface {
	Open(io.Reader) (DocumentReader, error)
}

type DocumentReaderOpenerFunc

type DocumentReaderOpenerFunc func(io.Reader) (DocumentReader, error)

func (DocumentReaderOpenerFunc) Open

type FolderReader

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

func NewFolderReader

func NewFolderReader(path, pattern string, concurrency int, opener DocumentReaderOpener) *FolderReader

func (*FolderReader) Start

func (fr *FolderReader) Start(ch chan<- redisearch.Document) error

func (*FolderReader) Stop

func (fr *FolderReader) Stop()

type Indexer

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

func New

func New(name, host string, concurrency int, ch chan redisearch.Document,
	parser DocumentParser, sp SchemaProvider, chunkSize int) *Indexer

func (*Indexer) GetNumIndexed

func (idx *Indexer) GetNumIndexed() int

Returns the number of documents indexed

func (*Indexer) Start

func (idx *Indexer) Start()

type SchemaProvider

type SchemaProvider interface {
	Schema() *redisearch.Schema
}

type SchemaProviderFunc

type SchemaProviderFunc func() *redisearch.Schema

func (SchemaProviderFunc) Schema

func (s SchemaProviderFunc) Schema() *redisearch.Schema

type SingleFileReader

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

func (*SingleFileReader) Start

func (r *SingleFileReader) Start(ch chan<- redisearch.Document) error

func (*SingleFileReader) Stop

func (r *SingleFileReader) Stop()

Jump to

Keyboard shortcuts

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