middleware

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregation

type Aggregation interface {
	GetName() string
	GetAgg(api *dsl.API) dsl.BaseAgg
	UnmarshalJSON([]byte) error
}

type AuthorFacet

type AuthorFacet struct {
	Name        string
	Identifiers []string
}

func (*AuthorFacet) GetAgg

func (af *AuthorFacet) GetAgg(api *dsl.API) dsl.BaseAgg

func (*AuthorFacet) GetName

func (af *AuthorFacet) GetName() string

type Middleware

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

func NewMiddleware

func NewMiddleware(es elastic.Client) *Middleware

func (*Middleware) Search

func (m *Middleware) Search(index string, facets *SearchFacets) (*Result, error)

type PersonFacet

type PersonFacet struct {
	Name   string
	Values []string
}

func (PersonFacet) FromJSON

func (sf PersonFacet) FromJSON(dataBytes []byte) ([]*PersonFacetResult, error)

func (*PersonFacet) GetAgg

func (sf *PersonFacet) GetAgg(api *dsl.API) dsl.BaseAgg

func (*PersonFacet) GetName

func (sf *PersonFacet) GetName() string

type PersonFacetResult

type PersonFacetResult struct {
	DocCount int    `json:"doc_count"`
	Key      string `json:"key"`
}

type PersonFacets

type PersonFacets []*PersonFacet

func (PersonFacets) FromJSON

func (sf PersonFacets) FromJSON(dataBytes []byte) (*PersonFacetsResult, error)

func (PersonFacets) GetAgg

func (sf PersonFacets) GetAgg(api *dsl.API) dsl.BaseAgg

func (PersonFacets) GetName

func (PersonFacets) GetName() string

type PersonFacetsResult

type PersonFacetsResult struct {
	DocCount int `json:"-"`
	Facets   map[string][]*PersonFacetResult
}

type Result

type Result struct {
}

type SearchFacets

type SearchFacets struct {
	StringFacets StringFacets
	PersonFacets PersonFacets
}

type StringFacet

type StringFacet struct {
	Name   string
	Values []string
}

func (StringFacet) FromJSON

func (sf StringFacet) FromJSON(dataBytes []byte) ([]*StringFacetResult, error)

func (*StringFacet) GetAgg

func (sf *StringFacet) GetAgg(api *dsl.API) dsl.BaseAgg

func (*StringFacet) GetName

func (sf *StringFacet) GetName() string

type StringFacetResult

type StringFacetResult struct {
	DocCount int    `json:"doc_count"`
	Key      string `json:"key"`
}

type StringFacets

type StringFacets []*StringFacet

func (StringFacets) FromJSON

func (sf StringFacets) FromJSON(dataBytes []byte) (*StringFacetsResult, error)

func (StringFacets) GetAgg

func (sf StringFacets) GetAgg(api *dsl.API) dsl.BaseAgg

func (StringFacets) GetName

func (StringFacets) GetName() string

type StringFacetsResult

type StringFacetsResult struct {
	DocCount int `json:"-"`
	Facets   map[string][]*StringFacetResult
}

Jump to

Keyboard shortcuts

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