PgSearchIndex

org.llm4s.rag.permissions.pg.PgSearchIndex
See thePgSearchIndex companion class
object PgSearchIndex

Attributes

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

Members list

Value members

Concrete methods

Create a new PgSearchIndex with the given configuration.

Create a new PgSearchIndex with the given configuration.

Value parameters

config

PostgreSQL configuration

Attributes

Returns

The search index, or error

def fromDataSource(dataSource: DataSource, vectorTableName: String): Result[PgSearchIndex]

A search index over dataSource, a pool the caller already has - a doobie HikariTransactor's kernel, a Play or Slick pool, or pgjdbc's PGSimpleDataSource. PgSearchIndex.close leaves dataSource open for its owner. Call initializeSchema() before first use, as with PgSearchIndex.apply. Store calls are blocking JDBC; run them on a blocking pool from effectful code.

A search index over dataSource, a pool the caller already has - a doobie HikariTransactor's kernel, a Play or Slick pool, or pgjdbc's PGSimpleDataSource. PgSearchIndex.close leaves dataSource open for its owner. Call initializeSchema() before first use, as with PgSearchIndex.apply. Store calls are blocking JDBC; run them on a blocking pool from effectful code.

The index has no connection settings to share, so its pgConfig is None: RAGConfig.withSearchIndex does not point the RAG pipeline's own vector store at the same database.

Value parameters

dataSource

a javax.sql.DataSource the caller owns and closes

vectorTableName

Name of the vectors table

Attributes

Returns

The search index, or error

def fromJdbcUrl(jdbcUrl: String, user: String, password: String, vectorTableName: String): Result[PgSearchIndex]

Create a PgSearchIndex from a JDBC URL.

Create a PgSearchIndex from a JDBC URL.

Value parameters

jdbcUrl

JDBC URL (e.g., "jdbc:postgresql://localhost:5432/mydb")

password

Database password

user

Database user

vectorTableName

Name of the vectors table

Attributes

Returns

The search index, or error