Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultStopWords = map[string]bool{ "a": true, "an": true, "and": true, "are": true, "as": true, "at": true, "be": true, "but": true, "by": true, "for": true, "if": true, "in": true, "into": true, "is": true, "it": true, "no": true, "not": true, "of": true, "on": true, "or": true, "such": true, "that": true, "the": true, "their": true, "then": true, "there": true, "these": true, "they": true, "this": true, "to": true, "was": true, "will": true, "with": true, }
DefaultStopWords contains common English words to filter out (similar to Lucene's default stop words).
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is the main entry point for the text search engine.
func NewIndex ¶
func NewIndex(ctx context.Context, config sop.DatabaseOptions, t sop.Transaction, name string) (*Index, error)
NewIndex creates or opens a text search index.
type SimpleTokenizer ¶
type SimpleTokenizer struct{}
SimpleTokenizer splits text by whitespace and punctuation, converting to lowercase.
func (*SimpleTokenizer) Tokenize ¶
func (t *SimpleTokenizer) Tokenize(text string) []string
type TextSearchResult ¶
TextSearchResult represents a scored document from text search.
Click to show internal directories.
Click to hide internal directories.