searchtest

package
v0.2.37 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package searchtest holds the backend-agnostic conformance suite for search.Store implementations. The bundled Bleve backend runs it; a backend that reaches the same engine some other way reuses it unchanged, which is what keeps "search on a laptop" and "search hosted" behaviourally identical behind the interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunConformance

func RunConformance(t *testing.T, newStore func(t *testing.T) search.Store, opts ...Options)

RunConformance exercises the full search.Store contract against a fresh store produced by newStore. newStore is called once per RunConformance.

Types

type Options

type Options struct {
	// Settle, when set, is called after every write and must return once that
	// write is visible to a Query. A backend that applies writes
	// asynchronously supplies it; a synchronous backend leaves it nil.
	Settle func(t *testing.T, s search.Store, tenant, collection string)
}

Options adapts the suite to a backend.

Jump to

Keyboard shortcuts

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