Documentation ¶
Overview ¶
Package textsearch implements basic text search features (for matching text fields of JSON documents).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexedDoc ¶
IndexedDoc holds a parsed "document"
func NewIndexedDoc ¶
func NewIndexedDoc(doc map[string]interface{}, fields []string) (*IndexedDoc, error)
NewIndexedDoc returns a parsed "document"
type SearchTerms ¶
type SearchTerms []*searchTerm
SearchTerms holds a parsed text search query
func ParseTextQuery ¶
func ParseTextQuery(q string) SearchTerms
ParseTextQuery returns a parsed text query
func (SearchTerms) Match ¶
func (terms SearchTerms) Match(d *IndexedDoc) bool
Match returns true if the query matches the given `IndexedDoc`
Click to show internal directories.
Click to hide internal directories.