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.
- Craft CMS 5.0+
- PHP 8.2+
- MySQL, MariaDB or PostgreSQL (whichever Craft is already using)
- OpenAI API key
There is no second database to provision, no connection settings, and no SQL to run by hand. The index lives in Craft's own database, alongside your content.
Smart Search has two search engines and picks one for you from what your database can
do. The Standard engine runs everywhere. The pgvector engine runs on PostgreSQL
when the vector extension is enabled, and is faster and a little sharper at ranking.
pgvector is optional; it is a bonus if your host offers it, never a requirement. See
Search Engines.
composer require ghoststreet/craft-smart-search
./craft plugin/install smart-searchThen, in Craft → Smart Search → Settings → OpenAI, paste your API key, and index your content from Smart Search → Index. That is the whole setup.
{% 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 %}Full documentation lives in the Smart Search Wiki:
- Getting Started
- Requirements
- Installation
- Search Engines
- Indexing Your Content
- Using Search in Templates
- Using the API (headless / external apps)
- Tuning Search Results
- AI Answer Setup
- Costs and Limits
- Security
- Troubleshooting
- Settings Reference
Email dev@ghost.st for bugs or questions.
Licensed under the Craft License. A license is required for each Craft project running Smart Search in production.
Built by Ghost Street