ActiveContext
is a gem used for interfacing with vector stores like Elasticsearch, OpenSearch and Postgres with PGVector for storing and querying vectors.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
TODO
Add an initializer with the following options:
enabled
:true|false
. Defaults tofalse
databases
: Hash containing database configuration optionslogger
: Logger. Defaults toLogger.new($stdout)
For example:
ActiveContext.configure do |config|
config.enabled = true
config.logger = ::Gitlab::Elasticsearch::Logger.build
config.databases = {
es1: {
adapter: 'elasticsearch',
prefix: 'gitlab',
options: ::Gitlab::CurrentSettings.elasticsearch_config
}
}
end
TODO