ghoststreet / craft-smart-search
Smart Search: hybrid and RAG search for Craft CMS using OpenAI embeddings and PostgreSQL pgvector.
Package info
github.com/ghoststreet/craft-smart-search
Type:craft-plugin
pkg:composer/ghoststreet/craft-smart-search
Requires
- php: >=8.2
- ext-pdo: *
- ext-pdo_pgsql: *
- craftcms/cms: ^5.0
- openai-php/client: ^0.18
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
This package is auto-updated.
Last update: 2026-07-17 04:18:22 UTC
README
AI-powered Smart Search and AI Answer for Craft CMS. Smart Search blends semantic (meaning-based) and keyword ranking, and can write a short AI Answer with sources when you want one.
Requirements
- Craft CMS 4.0+ or 5.0+
- PHP 8.2+
- PostgreSQL 12+ with the
pgvectorextension (MySQL is not supported) - OpenAI API key
Install
composer require ghoststreet/craft-smart-search ./craft plugin/install smart-search
Then, in Craft → Smart Search → Settings → Connections, add your OpenAI key and Postgres details.
One-time database setup is required before the plugin can index anything. See Installation in the wiki.
Quick example
{% set results = craft.smartSearch.search('how do I reset my password') %}
{% for r in results %}
<a href="{{ r.url }}">{{ r.title }}</a>
<p>{{ r.excerpt }}</p>
{% endfor %}
Documentation
Full documentation lives in the Smart Search Wiki:
- Getting Started
- Installation (including the one-time database setup)
- Using Search in Templates
- Using the API (headless / external apps)
- Tuning Search Results
- AI Answer Setup
- Costs and Limits
- Security
- Troubleshooting
- Settings Reference
Support
Email dev@ghost.st for bugs or questions.
License
Licensed under the Craft License. A license is required for each Craft project running Smart Search in production.
Built by Ghost Street