Documentation ¶
Index ¶
- type IndexElement
- type Indexer
- type Search
- func (f *Search) Close() error
- func (f *Search) Delete(eventID string) error
- func (f *Search) GetHighlights(result *bleve.SearchResult) []string
- func (f *Search) Index(elements ...IndexElement) error
- func (f *Search) Search(term string, roomIDs, keys []string, limit, from int, orderByStreamPos bool) (*bleve.SearchResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexElement ¶
type IndexElement struct { EventID string RoomID string Content string ContentType string StreamPosition int64 }
IndexElement describes the layout of an element to index
func (*IndexElement) SetContentType ¶
func (i *IndexElement) SetContentType(v string)
SetContentType sets i.ContentType given an identifier
type Search ¶
type Search struct {
FulltextIndex bleve.Index
}
Search contains all existing bleve.Index
func (*Search) GetHighlights ¶
GetHighlights extracts the highlights from a SearchResult.
func (*Search) Index ¶
func (f *Search) Index(elements ...IndexElement) error
Index indexes the given elements
Click to show internal directories.
Click to hide internal directories.