Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSearchNoMatch = errors.New("the search query does not match the index")
)
Functions ¶
This section is empty.
Types ¶
type TextIndex ¶
type TextIndex struct { Terms map[string]*search.Vectors DocCount int Docs map[int]bool // contains filtered or unexported fields }
TestIndex is a single document full-text index. This means that all data you append to it will have its position incremented and appends to the known state. It is not replaced. To reset the index to an empty state you have to call the reset method.
func NewTextIndex ¶
func NewTextIndex() *TextIndex
func (*TextIndex) AppendBytes ¶
AppendBytes extract words from bytes and updates the TextIndex.
func (*TextIndex) AppendString ¶
AppendString extract words from bytes and updates the TextIndex.
type TextQuery ¶
type TextQuery struct { Hits *search.Matches EmStartTag string EmStyleClass string // contains filtered or unexported fields }
func NewTextQuery ¶
func NewTextQueryFromString ¶
func (*TextQuery) AppendString ¶ added in v0.1.3
func (*TextQuery) PerformSearch ¶ added in v0.1.3
func (*TextQuery) SetTextIndex ¶ added in v0.1.3
Click to show internal directories.
Click to hide internal directories.