indexing

package
v0.0.0-...-a4f8009 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2013 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokenize

func Tokenize(r io.Reader) []string

func TokenizeString

func TokenizeString(s string) []string

Types

type DocId

type DocId uint32

type Document

type Document struct {
	Path    string
	Content string
}

func LoadFromFile

func LoadFromFile(path string, transform func(*os.File) (string, error)) (*Document, error)

func LoadFromMail

func LoadFromMail(path string) (*Document, error)

type Index

type Index struct {
	DocCounter DocId
	// contains filtered or unexported fields
}

func LoadIndex

func LoadIndex(reader io.Reader) (*Index, error)

func NewIndex

func NewIndex() *Index

func (*Index) Add

func (i *Index) Add(doc *Document) error

func (*Index) AssignDocId

func (i *Index) AssignDocId(path string) DocId

func (*Index) TermPaths

func (index *Index) TermPaths(term string) []string

func (*Index) Write

func (index *Index) Write(w io.Writer)

Jump to

Keyboard shortcuts

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