search

package
v0.7.0-ga.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCollectionsSearchRequests added in v0.6.9

func AddCollectionsSearchRequests(mss *elastic.MultiSearchService, query Query, sortBy string, from int, size int, preference string)

func AddContentUnitsSearchRequests added in v0.6.9

func AddContentUnitsSearchRequests(mss *elastic.MultiSearchService, query Query, sortBy string, from int, size int, preference string)

Types

type ESEngine

type ESEngine struct {
	// contains filtered or unexported fields
}

func NewESEngine

func NewESEngine(esc *elastic.Client, db *sql.DB) *ESEngine

func (*ESEngine) DoSearch

func (e *ESEngine) DoSearch(ctx context.Context, query Query, sortBy string, from int, size int, preference string) (interface{}, error)

func (*ESEngine) GetSuggestions

func (e *ESEngine) GetSuggestions(ctx context.Context, query Query) (interface{}, error)

type Engine

type Engine interface {
	GetSuggestions(ctx context.Context, query Query) (interface{}, error)
	DoSearch(ctx context.Context, query Query, from int, size int, preference string) (interface{}, error)
}

type Query

type Query struct {
	Term          string
	ExactTerms    []string
	Filters       map[string][]string
	LanguageOrder []string
}

Jump to

Keyboard shortcuts

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