elasticsearch

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Unlicense Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticsearchStorage

type ElasticsearchStorage struct {
	IndexName string
	// contains filtered or unexported fields
}

func (*ElasticsearchStorage) DeleteEvent

func (ess *ElasticsearchStorage) DeleteEvent(id string, pubkey string) error

func (*ElasticsearchStorage) Init

func (ess *ElasticsearchStorage) Init() error

func (*ElasticsearchStorage) QueryEvents

func (ess *ElasticsearchStorage) QueryEvents(filter *nostr.Filter) ([]nostr.Event, error)

func (*ElasticsearchStorage) SaveEvent

func (ess *ElasticsearchStorage) SaveEvent(evt *nostr.Event) error

type EsSearchResult

type EsSearchResult struct {
	Took     int
	TimedOut bool `json:"timed_out"`
	Hits     struct {
		Total struct {
			Value    int
			Relation string
		}
		Hits []struct {
			Source IndexedEvent `json:"_source"`
		}
	}
}

type IndexedEvent

type IndexedEvent struct {
	Event         nostr.Event `json:"event"`
	ContentSearch string      `json:"content_search"`
}

Jump to

Keyboard shortcuts

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