search

package
v0.0.0-...-8a7a009 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildResults

func BuildResults(recipes []elastigo.Hit) []models.Recipe

BuildResults loop through the hits based on the total hits

func SetIndex

func SetIndex(i string)

SetIndex set the index name

Types

type Connection

type Connection struct {
	Conn *elastigo.Conn
}

func NewConnection

func NewConnection() (*Connection, error)

NewConnection create a new Elastic Search connection

func (*Connection) Create

Create a new doc

func (*Connection) Delete

func (c *Connection) Delete(id string) (elastigo.BaseResponse, error)

Delete a doc from the index

func (*Connection) DeleteIndex

func (c *Connection) DeleteIndex() (elastigo.BaseResponse, error)

DeleteIndex alll docs from the index

func (*Connection) GetById

func (c *Connection) GetById(id string) (*models.Recipe, error)

GetById show the doc by id

func (*Connection) Query

func (c *Connection) Query(s string) ([]models.Recipe, error)

Query the index and match the search term

func (*Connection) Show

func (c *Connection) Show() ([]models.Recipe, error)

Show all the docs in the index

func (*Connection) Update

Update a doc by id

Jump to

Keyboard shortcuts

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