Version: v0.5.0 Latest Latest

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

Go to latest
Published: Mar 27, 2017 License: GPL-3.0 Imports: 11 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Index

type Index struct {
	// contains filtered or unexported fields

Index provides the interface to Bleve

func NewIndex

func NewIndex(indexPath string, shards int) (*Index, error)

NewIndex returns a new Index

func (*Index) DeleteBook

func (b *Index) DeleteBook(bk *note.Book) error

DeleteBook deletes all notes in the index for the notebook

func (*Index) DeleteNote

func (b *Index) DeleteNote(n *note.Note) error

DeleteNote deletes note from index

func (*Index) IndexNote

func (b *Index) IndexNote(n *note.Note) error

IndexNote creates or updates a note in Bleve index

func (*Index) IndexNotes

func (b *Index) IndexNotes(notes note.Notes) error

IndexNotes creates or updates a list of notes in Bleve index

func (*Index) SearchNote

func (b *Index) SearchNote(query string, limit, offset int) ([]int64, uint64, error)

SearchNote sends a search query to Bleve using QueryStringQuery

func (*Index) SearchNotePhrase

func (b *Index) SearchNotePhrase(query string, bk *note.Book, sort string, limit, offset int) ([]int64, uint64, error)

SearchNotePhrase sends a search query to Bleve using Prefix query If bk is given, only notes for that Book are queried.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL