OpenSearchEngine

org.llm4s.vectorstore.opensearch.OpenSearchEngine
See theOpenSearchEngine companion object
enum OpenSearchEngine(val wireName: String, val filtersInsideKnn: Boolean)

The k-NN library behind a knn_vector field's HNSW graph, fixed when the index is created.

Value parameters

filtersInsideKnn

whether the engine supports efficient filtering - the metadata filter inside the knn query, applied while the graph is searched, so topK results come back when that many match. Without it the filter is applied to the kNN hits afterwards (a post-filter), which can return fewer than topK.

wireName

the value of the mapping's method.engine parameter

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case Faiss extends OpenSearchEngine

Faiss's HNSW, OpenSearch's own default engine: efficient filtering since OpenSearch 2.9, cosinesimil since 2.19 (Faiss normalises the vectors it indexes to unit length).

Faiss's HNSW, OpenSearch's own default engine: efficient filtering since OpenSearch 2.9, cosinesimil since 2.19 (Faiss normalises the vectors it indexes to unit length).

Attributes

case Lucene extends OpenSearchEngine

Apache Lucene's HNSW, the default: efficient filtering since OpenSearch 2.4.

Apache Lucene's HNSW, the default: efficient filtering since OpenSearch 2.4.

Attributes

case Nmslib extends OpenSearchEngine

NMSLIB's HNSW: no efficient filtering, so filters are post-filters. OpenSearch deprecates it in favour of Lucene and Faiss, and a newer cluster may refuse to create an NMSLIB index; use it only for an index that already has it.

NMSLIB's HNSW: no efficient filtering, so filters are post-filters. OpenSearch deprecates it in favour of Lucene and Faiss, and a newer cluster may refuse to create an NMSLIB index; use it only for an index that already has it.

Attributes