es

package
v0.0.0-...-13c7043 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(es *elasticsearch.Client) repo.Repository

Types

type Document

type Document struct {
	Name     string  `json:"name"`
	Brand    string  `json:"brand"`
	Price    float32 `json:"price"`
	Category string  `json:"category"`
	Image    string  `json:"image"`
}

type Hit

type Hit struct {
	Id     string   `json:"_id"`
	Source Document `json:"_source"`
}

type Result

type Result struct {
	Hits struct {
		Hits []Hit `json:"hits"`
	} `json:"hits"`
}

type Update

type Update struct {
	Doc *Document `json:"doc"`
}

Jump to

Keyboard shortcuts

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