source

package
v0.0.0-...-ee216f3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Id      string
	Content DocumentContent
}

type DocumentContent

type DocumentContent map[string]interface{}

type ES7HitsTotalCount

type ES7HitsTotalCount struct {
	Value    int    `json:"value"`
	Relation string `json:"relation"`
}

type Hits

type Hits struct {
	Total       HitsTotalCount `json:"total"`
	HitsEntries []HitsEntry    `json:"hits"`
}

type HitsEntry

type HitsEntry struct {
	Index  string          `json:"_index"`
	Type   string          `json:"_type"`
	Id     string          `json:"_id"`
	Score  float64         `json:"_score"`
	Source DocumentContent `json:"_source"`
}

type HitsTotal

type HitsTotal struct {
	Value    int    `json:"value"`
	Relation string `json:"relation"`
}

type HitsTotalCount

type HitsTotalCount struct {
	Value int
}

func (*HitsTotalCount) UnmarshalJSON

func (h *HitsTotalCount) UnmarshalJSON(i []byte) error

type IndicesStats

type IndicesStats struct {
	Shards  Shards                 `json:"_shards"`
	All     IndicesStatsAll        `json:"_all"`
	Indices map[string]interface{} `json:"indices"`
}

type IndicesStatsAll

type IndicesStatsAll struct {
	Primaries map[string]interface{} `json:"primaries"`
	Total     map[string]interface{} `json:"total"`
}

type Pit

type Pit struct {
	Id        string `json:"id"`
	KeepAlive string `json:"keep_alive"`
}

type PitResponse

type PitResponse struct {
	Id string `json:"id"`
}

type Result

type Result struct {
	Took     int    `json:"took"`
	TimedOut bool   `json:"timed_out"`
	Hits     Hits   `json:"hits"`
	Pit      Pit    `json:"pit"`
	ScrollId string `json:"_scroll_id"`
}
type Search struct {
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch(from string, params *SearchParams, logger *logrus.Logger) (*Search, error)

func (*Search) Fetch

func (s *Search) Fetch() (chan file.File, error)

func (*Search) String

func (s *Search) String() string

type SearchInfo

type SearchInfo struct {
	Name        string  `json:"name"`
	ClusterName string  `json:"cluster_name"`
	ClusterUuid string  `json:"cluster_uuid"`
	Version     Version `json:"version"`
	Tagline     string  `json:"tagline"`
}

type SearchParams

type SearchParams struct {
	IndexFilter string
	Size        int
}

type SearchServerError

type SearchServerError struct {
	StatusCode int
}

func (SearchServerError) Error

func (s SearchServerError) Error() string

type Shards

type Shards struct {
	Total      int `json:"total"`
	Successful int `json:"successful"`
	Failed     int `json:"failed"`
}

type Sourcer

type Sourcer interface {
	String() string
	Fetch() (chan file.File, error)
}

type Version

type Version struct {
	Number                           string    `json:"number"`
	BuildFlavor                      string    `json:"build_flavor"`
	BuildType                        string    `json:"build_type"`
	BuildHash                        string    `json:"build_hash"`
	BuildDate                        time.Time `json:"build_date"`
	BuildSnapshot                    bool      `json:"build_snapshot"`
	LuceneVersion                    string    `json:"lucene_version"`
	MinimumWireCompatibilityVersion  string    `json:"minimum_wire_compatibility_version"`
	MinimumIndexCompatibilityVersion string    `json:"minimum_index_compatibility_version"`
}

Jump to

Keyboard shortcuts

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