Documentation ¶
Index ¶
- func Slurp(db *store.Store, server *SlurpSource, timeFrom, timeTo time.Time, ...) (store.ArtList, error)
- type Facet
- type FileLog
- type Logger
- type NullLogger
- type Results
- func (res *Results) Art(idx int) *store.Article
- func (res *Results) Dehydrate(artIDs store.ArtList)
- func (res *Results) Facet(idx int) *Facet
- func (res *Results) FindForward(artIdx int, needle string) int
- func (res *Results) FindReverse(artIdx int, needle string) int
- func (res *Results) HighlightTerms() string
- func (res *Results) Match(artIdx int, needle string) bool
- func (res *Results) Sort(sortColumn string, sortOrder int) *Results
- type SlurpSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NullLogger ¶
type NullLogger struct{}
func (NullLogger) Printf ¶
func (l NullLogger) Printf(format string, v ...interface{})
type Results ¶
type Results struct { Query string Arts store.ArtList Len int FacetLen int // contains filtered or unexported fields }
Results holds the results of a query. It holds a list of article IDs, with methods to fetch full articles from the store on demand.
func (*Results) Dehydrate ¶
Dehydrate removes artIDs from cache, forcing them to be fetched from db next time.
func (*Results) HighlightTerms ¶
return terms from current query, for highlighting eg if query is `chaos headline:"climate change"`, this fn should return "chaos","climate change". or something. TODO: should really fall out of query parsing...
type SlurpSource ¶
func LoadSlurpSources ¶
func LoadSlurpSources(fileName string) ([]SlurpSource, error)
Click to show internal directories.
Click to hide internal directories.