search

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2018 License: MIT Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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