Documentation
¶
Index ¶
- func Authors(f string) func(*Opts)
- func Body(f string) func(*Opts)
- func Cases(searchCases bool) func(*Opts)
- func DataType(d int) func(*Opts)
- func DocID(q string) func(*Opts)
- func Feeds(f string) func(*Opts)
- func Index(i string) func(*Opts)
- func Keywords(f string) func(*Opts)
- func Langs(f string) func(*Opts)
- func Limit(i int) func(*Opts)
- func OptsFromURL(urlQuery func(string) string) []func(*Opts)
- func Q(q string) func(*Opts)
- func Range(By, From, To string) func(*Opts)
- func RangeBy(i string) func(*Opts)
- func RangeFrom(i string) func(*Opts)
- func RangeTo(i string) func(*Opts)
- func Skip(i int) func(*Opts)
- func Sort(By string, Asc bool) func(*Opts)
- func Tags(f string) func(*Opts)
- func Title(f string) func(*Opts)
- func Topics(f string) func(*Opts)
- func Type(i string) func(*Opts)
- type Document
- type Entity
- type Opts
- type Pagination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptsFromURL ¶
Types ¶
type Document ¶
type Document struct { DocID string `json:"docId"` Lang string `json:"lang"` CrawledAt time.Time `json:"crawledAt"` ScreenName string `json:"screen_name"` URL string `json:"url"` TweetID int64 `json:"tweet_id"` TweetIDStr string `json:"tweet_id_str"` Content struct { Title string `json:"title,omitempty"` Excerpt string `json:"excerpt,omitempty"` Image string `json:"image,omitempty"` Body string `json:"body,omitempty"` Authors []string `json:"authors,omitempty"` Sources []string `json:"sources,omitempty"` Tags []string `json:"tags,omitempty"` Categories []string `json:"categories,omitempty"` PublishedAt time.Time `json:"publishedAt,omitempty"` EditedAt time.Time `json:"editedAt,omitempty"` } `json:"content"` NLP struct { Keywords []string `json:"keywords,omitempty"` StopWords []string `json:"stopWords,omitempty"` Entities []*Entity `json:"entities,omitempty"` Topics []string `json:"topics,omitempty"` Quotes []string `json:"quotes,omitempty"` Claims []string `json:"claims,omitempty"` Summary string `json:"summary,omitempty"` } `json:"nlp"` Feed *feed.Feed `json:"feed,omitempty"` RelCount int64 `json:"relCount,omitempty"` }
Document Raw document stored on elasticsearch
type Entity ¶
type Entity struct { EntityText string `json:"entity_text"` EntityType string `json:"entity_type"` }
Entity extracted entities from enrich service
type Opts ¶
type Opts struct { Index string Type string Sort struct { By string Asc bool } DataType int Cases bool Skip int Limit int DocID string Q string Title string Body string Tags string Topics string Authors string Langs string Feeds string Keywords string Range struct { By string From string To string } }
type Pagination ¶
type Pagination struct {
Total int `json:"total"`
}
Click to show internal directories.
Click to hide internal directories.