indexer

package
v0.0.0-...-038a048 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteExistingIndex

func DeleteExistingIndex(name string) error

DeleteExistingIndex checks if the index exist if it does, then flushes it off

func GetContent

func GetContent(name string) (string, error)

GetContent is a function for retrieving data from file

func NewIndex

func NewIndex(c conf.Configuration)

NewIndex is a function to create new indexes

func Search(indexFilename string, searchWord string) *bleve.SearchResult

Search function is used to search the string in the file and return the index

Types

type FileIndexer

type FileIndexer struct {
	FileName    string
	FileContent string
}

FileIndexer is a data structure to hold the content of the file

func NewFileIndexer

func NewFileIndexer(fname, fcontent string) FileIndexer

NewFileIndexer is a function to create a new File Indexer

type FileIndexerArray

type FileIndexerArray struct {
	IndexerArray []FileIndexer
	*logger.Logger
}

Jump to

Keyboard shortcuts

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