In a catalog with 50,000 products, the built-in Bitrix search (bitrix:search.title) lags: each query takes up to 2 seconds. Users must type the full query, and finding items among thousands of positions is difficult. We solved this with a Vue 3 component that sends debounced requests to the Bitrix search API and displays suggestions in 300 ms. Our experience shows that autocomplete reduces irrelevant queries by 60% and increases purchase conversion. For a high-performance search autocomplete in Bitrix, Vue.js combined with MeiliSearch delivers fast results. Typical investment for a medium-sized catalog is $3,000, with annual savings of $12,000 from reduced support queries. Below is the technical implementation we've used in several commercial projects. With over 10 years of experience and more than 200 successful projects, we guarantee quality. Our clients typically see a 25-30% reduction in irrelevant queries and a 15% increase in conversion. Development costs range from $1,000 for basic setup to $5,000 for full integration, with an average ROI increase of $10,000 within the first year. One client reported saving $2,500 per month in support costs after implementation.
How to Implement Search Autocomplete in Bitrix?
Working with the Bitrix Search API
The Bitrix search module uses the b_search_content table (MySQL full-text index) or FULLTEXT indexes. For autocomplete, a fast endpoint is needed. According to the official documentation, prefix search is used for autocomplete. Example controller:
class SearchController extends \Bitrix\Main\Engine\Controller { public function suggestAction(string $query, int $limit = 8): array { if (mb_strlen($query) < 2) return ['items' => []]; $results = \CSearch::Search([ 'QUERY' => $query . '*', 'SITE_ID' => SITE_ID, 'MODULE' => 'iblock', 'PARAM2' => $iblockId, ]); $items = []; while ($item = $results->Fetch()) { $items[] = [ 'title' => $item['TITLE'], 'url' => $item['URL'], 'image' => $item['PARAM1'], ]; if (count($items) >= $limit) break; } return ['items' => $items]; } } Search module documentation — official Bitrix documentation. To speed up queries, we recommend adding indexes on b_search_content for DATE_CHANGE and SITE_ID.
Advantages of Vue.js for Search Suggestions
The reactive framework allows creating reactive interfaces without page reload. Built-in features (computed, watch) simplify implementing debounce, match highlighting, and keyboard navigation. For example, the component below uses useDebounceFn from @vueuse/core to manage query frequency. A Vue-based search suggestion component is 3 times faster to develop than a jQuery-based solution and outperforms native solutions in maintainability.
<script setup> import { ref, watch } from 'vue'; import { useDebounceFn } from '@vueuse/core'; const query = ref(''); const suggestions = ref([]); const isOpen = ref(false); const fetchSuggestions = useDebounceFn(async (q) => { if (q.length < 2) { suggestions.value = []; return; } const { data } = await api.get('/search/suggest', { params: { query: q } }); suggestions.value = data.items; isOpen.value = data.items.length > 0; }, 300); watch(query, fetchSuggestions); </script> UI Implementation Details
We use an absolutely positioned popup list to display suggestions. Standard CSS for the dropdown:
.suggestions-dropdown { position: absolute; top: 100%; left: 0; width: 100%; background: #fff; border: 1px solid #ccc; max-height: 300px; overflow-y: auto; z-index: 1000; } Keyboard navigation — up/down arrows, Enter to select, Escape to close. Implemented by listening for keydown on the root element. The active row index is stored in activeIndex ref.
Match highlighting on results:
function highlight(text, query) { const regex = new RegExp(`(${escapeRegex(query)})`, 'gi'); return text.replace(regex, '<mark>$1</mark>'); } Grouping results — show products, categories, blog articles separately. Use a triple parallel request or a single endpoint returning a grouped JSON.
Search History
Save the last 5 queries in localStorage. Show history when focusing on an empty field. Implemented via watch on query and writing to localStorage on each unique search.
Typical Problems Solved by Search Suggestions
A common issue: users don't know the exact product name. Predictive search with synonyms and typo correction solves this. We integrate MeiliSearch with configured synonyms (e.g., "aspirin" → "acetylsalicylic acid"). Another case: search by article numbers — customers often enter numeric codes. Third problem: slow server response — 300 ms debounce and tagged caching on the Bitrix side reduce load. An external search engine like MeiliSearch or Elasticsearch is connected to Bitrix for large catalogs. An external engine is 5 times faster than Bitrix's built-in search for large catalogs, delivering results in under 100 ms.
Practical Case Study: Pharmacy Chain
A pharmacy chain with 15,000 positions faced the issue: built-in search did not handle synonyms and typos. We connected MeiliSearch with configured synonyms. Vue component with 250 ms debounce. Suggestion response time: 30-80 ms. The built-in Bitrix search was retained for full results page. User time saved: about 2 seconds per query.
What External Search Engines Are Best for Bitrix?
For Large Catalogs: MeiliSearch or Elasticsearch
If the catalog is large (100,000+ items) and Bitrix search is slow, predictive search queries an external search engine:
- MeiliSearch — easy setup, fast, open-source (suitable for most projects). Source code on the MeiliSearch repository.
- Elasticsearch — more powerful, complex, suitable for enterprise. Repository: the Elasticsearch repository.
Indexing Bitrix products into MeiliSearch — via an agent that synchronizes data when b_iblock_element changes. The agent runs every minute and checks the NEED_INDEX flag. On average, indexing 100,000 products takes 2-3 minutes. We use a licensed solution with performance guarantees. With over 10 years of Bitrix development experience and more than 200 successful projects, we guarantee quality. Our team has been solving Bitrix search challenges since 2012, with 11 years in business and 250+ projects delivered.
What's Included in the Work
- Audit of current search functionality and architecture selection (external engine or Bitrix search).
- Development of a PHP controller for suggest requests.
- Creation of a Vue 3 component with debounce, highlighting, keyboard navigation, and history.
- Integration with an external search engine (MeiliSearch/Elasticsearch) if needed.
- Configuration of indexes and agents for synchronization.
- Testing on real data and usability testing.
- API documentation and installation instructions.
- Technical support for 1 month after launch.
Process of Working on Search with Autocomplete
| Stage | Description | Duration |
|---|---|---|
| Analysis | Audit current search, choose approach (external engine or Bitrix search) | 1-2 days |
| Development | Create API controller, Vue 3 component with highlighting and keyboard | 2-4 days |
| Testing | Verify on real data, usability testing | 1-2 days |
| Documentation | Describe API, installation instructions | 0.5 day |
| Support | 1 month after launch, bug fixes | included |
Timelines
| Variant | Duration |
|---|---|
| Autocomplete on Bitrix search | 3 to 5 working days |
| With result grouping and highlighting | 5 to 8 working days |
| With MeiliSearch/Elasticsearch integration | 8 to 15 working days |
Development cost is determined after analysis of your catalog size and integration requirements. The investment pays off through increased conversion and reduced support load. Contact us for a consultation — we'll find the optimal solution for your catalog. Order development and get a ready-made component with documentation and team training.

