symfony/ai-manticore-search-store
ManticoreSearch Store integrates ManticoreSearch as a vector store for Symfony AI Store, enabling KNN/vector similarity search backed by Manticore’s engine. Includes links to Manticore KNN docs plus Symfony AI contribution and issue resources.
StoreInterface. This adds indirect coupling but avoids reinventing vector store logic.symfony/ai + symfony/ai-manticore-search-store.ManticoreSearchStore in Laravel’s container (e.g., via AppServiceProvider).VectorStore::findNearest()).manticoresearch/manticoresearch (version compatibility critical).pgvector), requires ETL scripts to transform embeddings into ManticoreSearch’s format.composer require symfony/ai manticoresearch/manticoresearch symfony/ai-manticore-search-store
# docker-compose.yml
services:
manticore:
image: manticoresoftware/manticore:latest
ports:
- "9308:9308"
volumes:
- manticore_data:/var/lib/manticore
use Symfony\Component\AI\Store\StoreInterface;
$store = app(StoreInterface::class); // Requires binding
// app/Facades/VectorStore.php
namespace App\Facades;
use Symfony\Component\AI\Store\StoreInterface;
class VectorStore {
public function __call($method, $args) {
return app(StoreInterface::class)->$method(...$args);
}
}
Register in AppServiceProvider:
public function register() {
$this->app->singleton('vector.store', function ($app) {
return new \Symfony\Component\AI\Bridge\Symfony\Store\ManticoreSearchStore(
new \ManticoreSearch\Client($app['config']['manticore.host'])
);
});
}
add(), findNearest(), remove().StoreInterface to Laravel’s container.CREATE TABLE embeddings (
id INT PRIMARY KEY,
embedding VECTOR(768) ENGINE=InnoDB,
metadata JSON,
INDEX knn_embedding (embedding) WITH TYPE = 'HNSW' AND PARAMS = 'ef_construction=128, m=16'
);
manticore dump + S3).StoreInterface.composer.json (e.g., ^0.8.0).^1.0.StoreInterface..env):
MANTOCORE_HOST=localhost
MANTOCORE_PORT=9308
MANTOCORE_INDEX=embeddings
|
How can I help you explore Laravel packages today?