search

package
v0.0.0-...-eb4f45b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	TookMs   int  `json:"took"`
	TimedOut bool `json:"timed_out"`
	Hits     hits
}

Response is what gets returned by a Search request.

type Searcher

type Searcher interface {
	Search(q string, from, size int) (*Response, error)
}

Searcher allows free-text search over the transcripts.

func NewElasticSearcher

func NewElasticSearcher(elasticAddress string) Searcher

NewElasticSearcher creates a new Searcher connected to the given elastic search instance at the given address.

type Source

type Source struct {
	Title      string `json:"title"`
	Lecturer   string `json:"lecturer"`
	Chaire     string `json:"chaire"`
	Type       string `json:"type"`
	TypeTitle  string `json:"type_title"`
	Language   string `json:"lang"`
	URL        string `json:"source_url"`
	Transcript string `json:"transcript"`
}

Source is a source indexed by the search engine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL