Documentation ¶
Index ¶
- Variables
- type Index
- func (b *Index) DeleteBook(bk *note.Book) error
- func (b *Index) DeleteIndex() error
- func (b *Index) DeleteNote(n *note.Note) error
- func (b *Index) IndexNote(n *note.Note) error
- func (b *Index) IndexNotes(notes note.Notes) error
- func (b *Index) SearchNote(query string, limit, offset int) ([]int64, uint64, error)
- func (b *Index) SearchNotePhrase(query string, bk *note.Book, sort string, limit, offset int) ([]int64, uint64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TitleBoost boost value for the title field TitleBoost = 0.8 // TagsBoost boost value for the tags field TagsBoost = 0.6 // BodyBoost boost value for the body field BodyBoost = 0.5 // MaxExpansions max expansion sets the limit on how many // documents the prefix max will match before returning. Prefix // matching is resource intensive. // // For more details see ElasticSearch's docs on "Query-Time Search-as-You-Type" MaxExpansions = 50 // Slop how much slop to give when matching the order and position of the words // For more details see ElasticSearch's docs on "Query-Time Search-as-You-Type" Slop = 20 )
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index provides the interface to ElasticSearch
func (*Index) DeleteBook ¶
DeleteBook deletes all notes in the index for the notebook
func (*Index) DeleteIndex ¶ added in v0.5.0
DeleteIndex deletes this index
func (*Index) DeleteNote ¶
DeleteNote deletes note from index
func (*Index) IndexNotes ¶
IndexNotes creates or updates a list of notes in ElasticSearch index
func (*Index) SearchNote ¶
SearchNote sends a search query to ElasticSearch using QueryStringQuery
Click to show internal directories.
Click to hide internal directories.