Documentation ¶
Index ¶
- type Indexer
- func (f *Indexer) AddPost(b Post)
- func (f *Indexer) AddPosts(posts []Post)
- func (f *Indexer) Close()
- func (f *Indexer) Search(query bluge.Query) (response SearchResponse)
- func (f *Indexer) SearchByRequest(searchRequest bluge.SearchRequest) SearchResponse
- func (f *Indexer) SearchQueryString(q string) SearchResponse
- func (f *Indexer) SearchThread(threadId string) (response SearchResponse)
- func (f *Indexer) Stats()
- type Parser
- type ParserBody
- type Post
- type SearchResponse
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
func NewForumIndex ¶
func (*Indexer) SearchByRequest ¶
func (f *Indexer) SearchByRequest(searchRequest bluge.SearchRequest) SearchResponse
func (*Indexer) SearchQueryString ¶
func (f *Indexer) SearchQueryString(q string) SearchResponse
func (*Indexer) SearchThread ¶
func (f *Indexer) SearchThread(threadId string) (response SearchResponse)
type ParserBody ¶
wrapper struct to make it easier to package responses
type Post ¶
type Post struct { Url string `json:"url"` ThreadId string `json:"threadid"` // thead identifier, same for all posts in a thread PostSeq int `json:"threadseq"` // post identifier, sequential in order within a thread page PageSeq int `json:"pageseq"` // page (of thread) id, ordered ThreadPostId string `json:"threadpostid"` // combined key, uniquely identifies a thread+post id, ordered Id string `json:"id"` // original post key (identifies a post) User string `json:"user"` UserIcon string `json:"usericon"` Hdr string `json:"hdr"` Msg string `json:"msg"` Html string `json:"html"` }
type SearchResponse ¶
type SearchResponse struct { Results []SearchResult TimeSeconds time.Duration ResultCount uint64 }
type SearchResult ¶
type SearchResult struct { Url string `json:"url"` ThreadId string `json:"threadid"` // thead identifier, same for all posts in a thread PostSeq int `json:"threadseq"` // post identifier, sequential in order within a thread page PageSeq int `json:"pageseq"` // page (of thread) id, ordered ThreadPostId string `json:"threadpostid"` // combined key, uniquely identifies a thread+post id Id string `json:"id"` User string `json:"user"` Initials string `json:"initials"` UserIcon string `json:"usericon"` Hdr string `json:"hdr"` Msg string `json:"msg"` Html template.HTML `json:"html"` Highlights map[string]template.HTML `json:"highlights"` UserColor string `json:"usercolor"` }
Click to show internal directories.
Click to hide internal directories.