HybridSearcher

org.llm4s.vectorstore.HybridSearcher
See theHybridSearcher companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Config(vectorStoreConfig: Config, keywordIndexConfig: Config, defaultStrategy: FusionStrategy)

Configuration for hybrid searcher.

Configuration for hybrid searcher.

Value parameters

defaultStrategy

Default fusion strategy

keywordIndexConfig

Keyword index configuration

vectorStoreConfig

Vector store configuration

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Config.type

Value members

Concrete methods

def apply(vectorStore: VectorStore, keywordIndex: KeywordIndex, defaultStrategy: FusionStrategy): HybridSearcher

Create a hybrid searcher from existing stores.

Create a hybrid searcher from existing stores.

Value parameters

defaultStrategy

Default fusion strategy (default: RRF)

keywordIndex

Keyword index for BM25 search

vectorStore

Vector store for semantic search

Attributes

Returns

Hybrid searcher

Create a hybrid searcher from configuration.

Create a hybrid searcher from configuration.

Value parameters

config

Hybrid searcher configuration

Attributes

Returns

Hybrid searcher or error

Create a hybrid searcher with in-memory stores.

Create a hybrid searcher with in-memory stores.

Attributes

Returns

Hybrid searcher or error

def sqlite(vectorDbPath: String, keywordDbPath: String): Result[HybridSearcher]

Create a hybrid searcher with SQLite file-based stores.

Create a hybrid searcher with SQLite file-based stores.

Value parameters

keywordDbPath

Path to keyword index database

vectorDbPath

Path to vector store database

Attributes

Returns

Hybrid searcher or error