opensearch

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package opensearch provides an OpenSearch type provider for CEL type system integration.

An OpenSearch index mapping is loaded with GET /<index>/_mapping and turned into a schema: scalar field types map to CEL scalars, object fields become nested schemas addressed by dot path (p.dims.width) and nested fields become lists of nested schemas that CEL comprehensions iterate (p.variants.exists(v, v.sku == "A")).

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSchema indicates a problem with the provided schema or index introspection.
	ErrInvalidSchema = errors.New("invalid schema")
)

Sentinel errors for the opensearch package.

View Source
var NewSchema = schema.NewSchema

NewSchema creates a new Schema. This is an alias for schema.NewSchema.

Functions

This section is empty.

Types

type FieldSchema

type FieldSchema = schema.FieldSchema

FieldSchema is an alias for schema.FieldSchema.

type Schema

type Schema = schema.Schema

Schema is an alias for schema.Schema.

type TypeProvider

type TypeProvider interface {
	types.Provider
	LoadTableSchema(ctx context.Context, indexName string) error
	GetSchemas() map[string]Schema
	Close()
}

TypeProvider is the OpenSearch type provider interface.

func NewTypeProvider

func NewTypeProvider(schemas map[string]Schema) TypeProvider

NewTypeProvider creates a new OpenSearch type provider with pre-defined schemas.

func NewTypeProviderWithClient

func NewTypeProviderWithClient(_ context.Context, client *opensearchapi.Client) (TypeProvider, error)

NewTypeProviderWithClient creates a new OpenSearch type provider that can introspect index mappings. The caller owns the *opensearchapi.Client and is responsible for its lifetime; Close is a no-op.

Jump to

Keyboard shortcuts

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