index

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any](connector nselastic.Connector, index string) (idx nselastic.Index[T], err error)

Types

type Delete

type Delete struct {
	Index       string `json:"_index"`
	ID          string `json:"_id"`
	Version     int64  `json:"_version"`
	Result      string `json:"result"`
	Shards      Shards `json:"_shards"`
	SeqNo       int64  `json:"_seq_no"`
	PrimaryTerm int64  `json:"_primary_term"`
	Status      int64  `json:"status"`
}

type Hit

type Hit[T any] struct {
	Index  string `json:"_index"`
	ID     string `json:"_id"`
	Score  any    `json:"_score"`
	Source T      `json:"_source"`
}

type Hits

type Hits[T any] struct {
	Total    Total    `json:"total"`
	MaxScore any      `json:"max_score"`
	Hits     []Hit[T] `json:"hits"`
}

type Item

type Item struct {
	Delete Delete `json:"delete"`
}

type Shards

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

type Total

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

Jump to

Keyboard shortcuts

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