fehrist

package
v0.0.0-...-e90f4de Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSV

type CSV struct {
	IndexName string
}

A CSV represents a CSV Doccument

func (*CSV) Index

func (c *CSV) Index(fileName string) (int, error)

Index indexes the document

func (*CSV) Init

func (c *CSV) Init() int

Init initializes the index and document related maps of the given index for CSV Documents

func (*CSV) Search

func (c *CSV) Search(keyword string) (string, int, error)

Search returns the result against the keyword being provided.

type DocumentList

type DocumentList struct {
	FileName string
	DocText  string
}

DocumentList holds the return searched doc structure

type Indexer

type Indexer interface {
	Index(fileName string)
	// contains filtered or unexported methods
}

Indexer is the interface that implements important stuff

type JSON

type JSON struct {
	IndexName string
}

A JSON represents a CSV Doccument

func (*JSON) Index

func (c *JSON) Index(fileName string) (int, error)

Index is used to index JSON documents after assigning Document ID

func (*JSON) Init

func (c *JSON) Init() int

Init initializes the index and document related maps of the given index for JSON Documents

func (*JSON) Search

func (c *JSON) Search(keyword string) (string, int, error)

Search returns the result against the keyword being provided.

type SearchResult

type SearchResult struct {
	Total  int
	Result []DocumentList
}

SearchResult implements Search JSON

Jump to

Keyboard shortcuts

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