Documentation ¶
Index ¶
- Constants
- func ScheduleEpisodeIndexing()
- func SchedulePodcastIndexing()
- type ElasticOperatorQuery
- type ElasticPrecisionQuery
- type ElasticResponse
- type FieldOperator
- type FieldPrecision
- type HitDetail
- type HitsInfo
- type MatchOperator
- type MatchPrecision
- type PodcastSearchMetadata
- type QueryOperator
- type QueryPrecision
- type Result
- type ResultSorter
- type SearchResult
- type Shard
Constants ¶
View Source
const ( PAGE_SIZE int = 20 MIN_RESULTS int = 20 )
View Source
const (
ITUNES_SEARCH_URL string = "https://itunes.apple.com/search?media=podcast&entity=podcast&limit=200&term="
)
Variables ¶
This section is empty.
Functions ¶
func ScheduleEpisodeIndexing ¶
func ScheduleEpisodeIndexing()
func SchedulePodcastIndexing ¶
func SchedulePodcastIndexing()
Types ¶
type ElasticOperatorQuery ¶
type ElasticOperatorQuery struct {
Query MatchOperator `json:"query"`
}
type ElasticPrecisionQuery ¶
type ElasticPrecisionQuery struct {
Query MatchPrecision `json:"query"`
}
type ElasticResponse ¶
type FieldOperator ¶
type FieldOperator struct {
Field QueryOperator `json:"_all"`
}
type FieldPrecision ¶
type FieldPrecision struct {
Field QueryPrecision `json:"_all"`
}
type MatchOperator ¶
type MatchOperator struct {
Match FieldOperator `json:"match"`
}
type MatchPrecision ¶
type MatchPrecision struct {
Match FieldPrecision `json:"match"`
}
type PodcastSearchMetadata ¶
type QueryOperator ¶
type QueryPrecision ¶
type Result ¶
type Result struct { Uid string `jsonapi:"primary,result"` Kind string `jsonapi:"attr,kind"` // podcast | episode Title string `jsonapi:"attr,title"` Subtitle string `jsonapi:"attr,subtitle"` Description string `jsonapi:"attr,description"` Url string `jsonapi:"attr,url"` Feed string `jsonapi:"attr,feed"` ImageUrl string `jsonapi:"attr,image_url"` // metadata Score int `jsonapi:"attr,score"` // scaled to [0..100] Published int64 `jsonapi:"attr,published"` }
func SearchITunes ¶
type ResultSorter ¶
type ResultSorter []*Result
TODO keep this for now, we may need it for sorting of results at some point
func (ResultSorter) Len ¶
func (r ResultSorter) Len() int
func (ResultSorter) Less ¶
func (r ResultSorter) Less(i, j int) bool
func (ResultSorter) Swap ¶
func (r ResultSorter) Swap(i, j int)
type SearchResult ¶
type SearchResult struct { Uid string `jsonapi:"primary,search"` Count int `jsonapi:"attr,count"` SearchTerm string `jsonapi:"attr,search_term"` Duration int64 `jsonapi:"attr,duration"` Results []*Result `jsonapi:"relation,results"` }
func SearchElastic ¶
func SearchElastic(q string, page int, limit int) (*SearchResult, error)
Click to show internal directories.
Click to hide internal directories.