search_api_trusearch
TruSearch is a Drupal 10/11 Search API backend that connects your site to an external AI-powered hybrid search engine. Instead of querying a local database, search queries are sent to the TruSearch engine which combines keyword and semantic (vector) search to deliver intelligent, context-aware results. The engine can also generate AI answers directly from your content using Retrieval-Augmented Generation(RAG), surface popular/trending queries, and track how users interact with search results.
Features
Hybrid search - Combines keyword (lexical) and semantic (vector) search with configurable weighting, or use either mode independently
- AI-generated answers - Engine reads your indexed content and generates direct answers above results (RAG), with helpfulness feedback collection
- Generative UI widgets - Engine can return structured cards (step-by-step guides, knowledge cards, ranked lists) alongside standard results
- Autocomplete widget - Embed a pre-built search widget block powered by the engine's JavaScript library
- Search overlay - Popular and trending queries shown when a user focuses the search field
- Click & conversion tracking - Records which results users click and attributes downstream conversions (signups, purchases, downloads) back to the originating search
- Secure widget proxy - Engine panel IDs and API keys never reach the browser; only a short-lived token is exposed
Post-Installation
1. Go to Admin -> Configuration -> Search and metadata -> TruSearch Settings and enter your engine URL, API key, and tenant ID
2. Go to Admin -> Configuration -> Search and metadata -> Search API and create (or edit) a server using the TruSearch backend
3. Create a Search API index attached to that server and configure which content types and fields to index
4. Run the indexer via Drush (drush search-api:index) or through the UI
5. Optionally place the Autocomplete Widget block on your site and configure a TruSearch Page node (/admin/content/add/trusearch_page) as your search results page
Additional Requirements
- Drupal 10 or 11
- PHP 8.1+
- https://www.drupal.org/project/search_api module
- A running TruSearch engine instance (external service) with a valid API key and tenant ID
No-Code Search Page Builder
The TruSearch engine includes a built-in drag-and-drop search page builder in its dashboard. Without writing a single line of code, you can visually design your search results page arranging result cards, facet panels, AI answer boxes, sorting controls, and pagination exactly where you want them. You can configure result display, define which facets appear, tune the search mode (hybrid, keyword, or semantic), and preview the layout in real time all from the engine's UI.
Once your layout is ready, the engine gives you a Widget ID. That ID is the only thing you bring back into Drupal. From there you have two options:
Option 1 — Embed in a page
Create a node of type TruSearch Page (/admin/content/add/trusearch_page), enter the Widget ID in the provided field, and save. The module handles the rest it generates a secure token, proxies all widget communication through Drupal (so your API key never reaches the browser), and renders the full search experience at the node's URL.
Option 2 — Embed via a block
Place the TruSearch Autocomplete Widget block through the standard Drupal block layout UI, enter the Widget ID in the block configuration, and assign it to any region on any page. The same token-based proxy security applies.
In both cases, when the engine's layout is updated in its dashboard, the changes are reflected on your site immediately — no redeployment, no config changes in Drupal required.