infinispan

package
v0.0.0-...-5bc5eca Latest Latest
Warning

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

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

Documentation

Overview

Package infinispan provides a vector store implementation using Infinispan REST API v3. Requires Infinispan 16.1 or later for vector search support with @Vector annotation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfinispanClient

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

InfinispanClient handles HTTP communication with Infinispan REST API v3.

func (*InfinispanClient) CacheExists

func (c *InfinispanClient) CacheExists(ctx context.Context, cacheName string) (bool, error)

CacheExists checks if a cache exists using HEAD request.

func (*InfinispanClient) Close

func (c *InfinispanClient) Close() error

Close closes the HTTP client.

func (*InfinispanClient) CreateCache

func (c *InfinispanClient) CreateCache(ctx context.Context, cacheName string, dimension int) error

CreateCache creates a new cache with the given configuration.

func (*InfinispanClient) DeleteByQuery

func (c *InfinispanClient) DeleteByQuery(ctx context.Context, cacheName, query string) error

DeleteByQuery deletes entries matching an Ickle query.

func (*InfinispanClient) PutEntry

func (c *InfinispanClient) PutEntry(ctx context.Context, cacheName, key string, value map[string]interface{}) error

PutEntry inserts or updates an entry in the cache.

func (*InfinispanClient) RegisterSchema

func (c *InfinispanClient) RegisterSchema(ctx context.Context, dimension int) error

RegisterSchema registers a Protobuf schema with Infinispan.

func (*InfinispanClient) Search

func (c *InfinispanClient) Search(ctx context.Context, cacheName, query string, maxResults int) (*SearchResponse, error)

Search executes an Ickle query and returns results.

type InfinispanStore

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

InfinispanStore implements VectorStore using Infinispan REST API.

func (*InfinispanStore) DeleteByConversationGroupID

func (s *InfinispanStore) DeleteByConversationGroupID(ctx context.Context, conversationGroupID uuid.UUID) error

func (*InfinispanStore) IsEnabled

func (s *InfinispanStore) IsEnabled() bool

func (*InfinispanStore) Name

func (s *InfinispanStore) Name() string

func (*InfinispanStore) Search

func (s *InfinispanStore) Search(ctx context.Context, embedding []float32, conversationGroupIDs []uuid.UUID, limit int) ([]registryvector.VectorSearchResult, error)

func (*InfinispanStore) Upsert

type SearchHit

type SearchHit struct {
	Hit   map[string]interface{} `json:"hit"`
	Score interface{}            `json:"score()"`
}

SearchHit represents a single search result.

type SearchRequest

type SearchRequest struct {
	Query      string `json:"query"`
	MaxResults int    `json:"max_results"`
	QueryMode  string `json:"query_mode"`
}

SearchRequest represents an Infinispan search request.

type SearchResponse

type SearchResponse struct {
	HitCount int         `json:"hit_count"`
	Hits     []SearchHit `json:"hits"`
}

SearchResponse represents an Infinispan search response.

Jump to

Keyboard shortcuts

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