Dexter is a powerful and highly configurable add-on that indexes your Craft entries, files, categories, and users in Algolia or Meilisearch. It gives you full control over how your content is structured and searched.
Search implementations are rarely one-size-fits-all. Every site has unique business rules and content models. Dexter provides a reliable foundation for getting your content into a search index, along with the tools to tailor the output to your exact needs.
Make all your files searchable with Dexter, including content from PDFs, Word, text files, CSVs, and XML. You can index all content, or limit it the number of pages or words.
Add a connection to OpenAI through Dexter's configuration options and images will be described and categorized for searchability. Descriptions, alt text, and categories are saved back to the file object in Craft's database.
Dexter keeps your index in sync by updating it when entries are created, updated, or deleted. You can also run a full re-index to clear and rebuild the index from scratch. This feature works smoothly with the queue for background processing.
Dexter lets you export settings to a .json file in your config directory for version control, make modifications to it, and import back to the related index in Algolia or Meilisearch.
Dexter supports all native fields out of the box. If you need more control, you can extend its behavior with PHP using the Pipeline pattern to transform your content however you like.
Dexter is built for indexing and displaying the most relevant search results fast and efficiently. It includes tags for native template integration, and an API endpoint for creating a custom front-end search experience using JavaScript libraries like Algolia's InstantSearch or any other solution that fits your stack.
This plugin requires Craft CMS 5.8.0 or later, or Craft CMS 6.0.0 or later, and PHP 8.2 or later.
Craft 6 is a Laravel-based application and no longer ships the legacy Yii APIs that Dexter
relies on. Those APIs are provided by the official compatibility layer,
craftcms/yii2-adapter. On Craft 6 you must
install it alongside Dexter:
composer require craftcms/yii2-adapterThe adapter activates automatically once any installed plugin requires it. It is not needed
on Craft 5 (and cannot be installed there, since it depends on craftcms/cms ^6), which is why
it is listed under suggest rather than require — keeping Dexter installable on both Craft 5
and Craft 6 from a single release.
You can install this plugin from the Plugin Store or with Composer.
Go to the Plugin Store in your project’s Control Panel and search for “Dexter”. Then press “Install”.
Open your terminal and run the following commands:
# go to the project directory
cd /path/to/my-project.test
# tell Composer to load the plugin
composer require boldminded/craft-dexter
# tell Craft to install the plugin
./craft plugin/install dexterhttps://docs.boldminded.com/dexter/docs-craft
https://mysite.com/dexter/search?index=demo_collections&term=empire
https://mysite.com/dexter/search
body: {
"index": "demo_collections",
"term": "empire",
"filters": {
"limit": 6,
"hybrid": {
"embedder": "fullText"
}
}
}
Iterate over search results object directly from Algolia or Meilisearch.
{% set results = craft.dexter.search({
index: 'demo_collections',
filter: [],
perPage: 50,
}) %}
{% if results %}
<ul>
{% for result in results %}
<li>{{ result.title }}</li>
{% endfor %}
</ul>
{% else %}
<p>No results found.</p>
{% endif %}Or, use the idsOnly parameter to retrieve only the UIDs of the search results. Then use the UIDs to fetch
the full entry object with Craft's entries tag.
{% set ids = craft.dexter.search({
index: 'demo_collections',
term: 'empire',
filter: [],
perPage: 50,
idsOnly: true,
}) %}
{% set entries = craft.entries.section('collection').uid(ids).all() %}
{% if entries %}
<ul>
{% for result in entries %}
<li>{{ result.title }}</li>
{% endfor %}
</ul>
{% else %}
<p>No results found.</p>
{% endif %}