augustine

package module
v0.0.0-...-487578d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2014 License: MIT Imports: 12 Imported by: 0

README

Augustine

An information retrieval experiment.

Nothing to see here. Move along.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchPostings

func SearchPostings(postings []Posting, p Posting) int

SearchPostings searches for p in a sorted slice of Postings and returns the index as specified by sort.Search.

Types

type DB

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

func Open

func Open(dir string) (*DB, error)

func (*DB) Close

func (d *DB) Close()

func (*DB) Get

func (d *DB) Get(id uint64) (doc *Doc, err error)

func (*DB) Print

func (d *DB) Print()

func (*DB) Put

func (d *DB) Put(doc *Doc) (id uint64, err error)

func (*DB) Search

func (d *DB) Search(query []byte) []*Doc

type Doc

type Doc struct {
	Text []byte
}

func (*Doc) MarshalBinary

func (d *Doc) MarshalBinary() ([]byte, error)

func (*Doc) UnmarshalBinary

func (d *Doc) UnmarshalBinary(b []byte) error

type FTSIndex

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

func NewFTSIndex

func NewFTSIndex() *FTSIndex

func (*FTSIndex) Add

func (x *FTSIndex) Add(term string, p Posting)

func (*FTSIndex) Search

func (x *FTSIndex) Search(terms []string) []Posting

type Normalizer

type Normalizer interface {
	Normalize(tok []byte) (terms []string)
}

func NewSimpleNormalizer

func NewSimpleNormalizer() Normalizer

type Posting

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

func (Posting) LessEq

func (p Posting) LessEq(other Posting) bool

type SimpleTokenReader

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

func (*SimpleTokenReader) ReadToken

func (r *SimpleTokenReader) ReadToken() (tok []byte, err error)

type TokenReader

type TokenReader interface {
	ReadToken() (tok []byte, err error)
}

func SimpleTokenizer

func SimpleTokenizer(r io.Reader) TokenReader

type Tokenizer

type Tokenizer func(io.Reader) TokenReader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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