AACSearch / guide
1C-Bitrix module
Install and connect the aacworkflow.aacsearch module, configure it, run the first and delta exports, place the aacsearch components, turn on the smart filter, SEO filter pages, voice search and recommendations, and troubleshoot.
aacworkflow.aacsearch runs inside a Bitrix site. It reads the catalogue,
queues every change and sends it to AACSearch through a
connector. It also provides search, a smart filter,
suggestions, recommendations and query analytics on the storefront. The module
does not search by itself. The index, morphology, typo tolerance and
recommendations live on the AACSearch side, so without a key the module
installs but stays idle.
Requirements
| Row label / название строки | Row label / название строки |
|---|---|
| PHP | 8.1 or newer |
| 1C-Bitrix | 22.0.0 or newer, an edition with Information blocks |
| Modules | iblock required; catalog and sale optional |
| Hosting | outgoing HTTPS to the AACSearch API (or pull mode) |
| Database | MySQL |
On editions without catalog (Start), elements of information blocks are
indexed, but prices and stock do not exist, so the rules about them do nothing
and are hidden.
Install
The module is built for the Bitrix Marketplace but is not yet published
there. Once it is: Marketplace → Installed solutions → Install. A build of
the module (marketplace/build-last-version.sh --archive) produces the full
package and an update package with the same contents.
Installation:
- creates the module tables;
- copies the components to
/bitrix/components/aacsearch/, the admin pages to/bitrix/admin/and the public endpoints to/bitrix/tools/aac.search/; - registers the event handlers and the background agents;
- adds the URL rewrite rule for the storefront proxy at
/aacsearch/api/.
The menu lives under Services → AACSearch. Updating from the Marketplace replaces the module files without running the installer. On the next admin hit the module detects the version change and repeats the idempotent install steps: files, the rewrite rule, events, agents and default settings. If any of these went missing, Diagnostics offers Complete the installation.
The agents run on Bitrix's own agent mechanism, on page hits or on a configured cron. A site with no visits and no cron does not sync.
Connect
There are two ways, and the key you paste decides which one the module uses.
Installation key (1.8.1+, recommended)
Create the installation
In the console, Integrations → CMS stores → Connect a store, platform
1C-Bitrix, with the site's HTTPS origin. Copy the aac_install_… key; it
is shown once.
Connect the module
In Bitrix, open the module's settings page, paste the key into Installation key from Console and press Connect.
Bind and publish
The module reports its sites, catalogues and schemas. In the console, add the discovered stores, bind catalogues to collections, and publish. The details are in CMS installations.
With an installation key, the settings page only has Connect, Check
Console settings and Enable/Disable module. It shows the applied
configuration revision and the latest error. Catalogue, search, recommendation
and billing settings belong to the console. The InstallationAgent (every
30 seconds) reads the published configuration, applies it and acknowledges the
revision, then starts the first full export of each bound source and runs
console commands.
What the console switches do on the site:
| Console switch | Module setting | Effect |
|---|---|---|
| Search in existing theme | native_catalog (+ native_engine when the native_index source is bound) | catalog sections and the native search run on AACSearch |
| Smart filters | native_filter | the smart filter drop-in |
| Show AACSearch widgets | — | not supported yet in installation-key mode: the module refuses such a configuration with an error |
Existing installations with an aac_sk_… key keep the classic settings page
below. An installation key cannot call the tenant API or be used from another
domain.
Classic API key and connector
Older installations use a server API key from Settings → API keys and the five-step Setup wizard: key, connection check, catalogue, first export, storefront. Connect on the first step does everything at once. It checks the connection, maps every product information block, creates the collection, provisions recommendation models and the assistant (best effort), creates the connector, and queues the first export.
The wizard creates a bitrix push connector for the primary collection and
stores its id and secret. If the platform already has a bitrix connector for
that collection but the site lost the secret, the wizard stops. Paste the id and
secret from Sources into the settings instead. Until a connector is
configured, the module falls back to a direct import, and Diagnostics reports
the export route as a warning.
Settings page
The classic settings page is per site (a site switcher appears when there is more than one) and has five tabs.
General settings
| Field | Option | Notes |
|---|---|---|
| Module enabled | enabled | master switch: without it the queue, agents and event handlers do nothing |
| API key | api_key | stays on the server; stored encrypted when an encryption key file is configured |
| API URL | — | the AACSearch cloud, unless overridden by server-side configuration |
| Result personalization | personalize_search | passes the visitor session id |
Iblock mapping — which information block goes to which collection, with its
search fields (query_by) and facet properties. Each row has a Reindex
button.
What not to export — applied on every export. After changing a rule, run a reindex so it also applies to products already exported.
| Field | Option |
|---|---|
| Items not available for purchase | exclude_unavailable |
| Unavailable items: keep in the index but rank them down | downrank_unavailable |
| Items without a price | exclude_without_price |
| Excluded sections (IDs) | exclude_sections |
| Excluded properties (codes) | exclude_properties |
Security
| Field | Option | Notes |
|---|---|---|
| Events per IP per window / window length | events_rate_limit, events_rate_window | mandatory limit on the public event endpoint |
| Keep search events, days | analytics_retention_days | local impressions and clicks table |
| Encryption key file | encryption_key_file | must live outside the site root |
| One collection for the whole site | site_collection | index every connected information block into one collection; rerun the wizard after changing it |
| Connector ID / secret / collection | connector_id, connector_secret, connector_collection | the export connector; see below |
| Access token (pull) | pull_token | empty turns pull mode off |
| Keep the log, days | outbox_retention_days | pull-mode change log retention |
| Webhook signing secret | webhook_secret | empty turns the incoming webhook endpoint off |
One connector serves one collection. A store with several catalogues needs a connector per collection. Filling Connector collection keeps other information blocks off that connector, and they keep their previous route until they get their own.
Advanced
| Field | Option | Notes |
|---|---|---|
| Search page URL | search_page_url | where suggestion links lead; empty — the site directory + search/ |
| Price type for product cards | price_code | price type code(s) for cards in results and recommendations |
| Offer properties in search | offer_search_properties | SKU properties merged into the product document |
| Auto reindex | auto_reindex | daily full reindex at 03:00 server time; off by default |
| Log level | log_level | errors only / errors + info / debug |
Buttons: Detect catalog automatically (adds missing mappings without overwriting existing ones) and Reindex all iblocks.
Initial and delta indexing
Every path into the index goes through the module's queue. The Sync queue page shows how many rows are pending, being processed or failed.
| Mechanism | Agent / trigger | What it does |
|---|---|---|
| Change events | catalogue, price, stock, section and property events → queue; QueueAgent every 60 s | sends changed products; several changes to one product before processing collapse into one row |
| Delta scan | DeltaSyncAgent every 300 s | finds elements changed since the last pass by TIMESTAMP_X (direct DB writes, 1C exchange), plus elements whose active-from/to date passed; up to 1000 per pass |
| Full export | Reindex page, the wizard, a console reindex command | FullReindex seeds the queue in resumable portions (up to 20 000 ids per pass) that the agent continues |
| Scheduled full export | ReindexAgent, daily at 03:00 | only when auto_reindex is on |
Deactivating an element, or leaving its active-date window, removes it from the
index. A 1C exchange (OnSuccessCatalogImport1C) triggers a full check, because
per-element events are unreliable after it. Changing a property definition
reindexes that information block.
A failed row is retried after 0 s, 1 min, 5 min, 30 min and 2 h (±25% jitter),
at most five times. Responses that retrying will not fix (400, 401, 402,
403, 404, 409, 413, 422) are not retried. The row stays failed until
the cause is fixed and it is retried from the queue page.
For large catalogues, process the queue from cron instead of page hits (CLI
only; the web request answers 404):
*/5 * * * * php /path/to/site/bitrix/tools/aac.search/queue_worker.php 1000The worker and the agent share a lock, so a row is never processed twice.
Pull mode when the host blocks outgoing calls
Set Access token on the Security tab. Then create a connector in
Sources with sync mode pull, pull URL
https://your-site/bitrix/tools/aac.search/pull-outbox.php and the same token.
The platform polls that URL on the connector's schedule, as described in
Pull. pull-export.php
uses a different protocol, and the platform's pull job does not read it.
Components
Components are in the visual editor under AACSearch. To switch a template, change the component namespace:
| Component | Replaces |
|---|---|
aacsearch:search.box | bitrix:search.title |
aacsearch:search.results | bitrix:search.page |
aacsearch:catalog.search | search inside a section |
aacsearch:smart.filter | bitrix:catalog.smart.filter |
aacsearch:recommendations | — |
The rest: instant.search, search.app, assistant.chat, ai.assistant,
no.results.assistant, product.advisor, image.search, voice.search,
similar.products, seo.filter, seo.links, search.analytics,
search.funnel.
Key parameters (all components also take SITE_ID; empty COLLECTION or
IBLOCK_ID means the main one from settings):
| Component | Parameters (default) |
|---|---|
search.box | COLLECTION, PLACEHOLDER, SUGGEST_LIMIT (8), MIN_QUERY_LEN (2), SHOW_HISTORY (Y), HISTORY_COUNT (5) |
search.results | IBLOCK_ID, COLLECTION, FACET_BY, FILTER_BY, PER_PAGE (20) |
instant.search | MODE (PAGE or AUTOCOMPLETE), IBLOCK_ID, COLLECTION, PLACEHOLDER, PER_PAGE |
smart.filter | IBLOCK_ID, COLLECTION, FACETS, FILTER_NAME (arrFilter), SELECTED |
recommendations | RECOMMENDATION_TYPE (similar), PRODUCT_ID (={$_REQUEST["ELEMENT_ID"]}), IBLOCK_ID, UI (Y), TITLE, LAYOUT (carousel or grid), LIMIT (12) |
similar.products | PRODUCT_ID, PRODUCT_NAME, IBLOCK_ID, COLLECTION, UI (Y), TITLE, LIMIT |
voice.search | IBLOCK_ID, COLLECTION, LIMIT (12) |
seo.filter | IBLOCK_ID, COLLECTION, URL, QUERY (={$_REQUEST["q"]}), FILTER_BY, PER_PAGE |
seo.links | IBLOCK_ID, TITLE, LIMIT (12) |
All components support composite mode. Results and facets are dynamic zones, so the static cache does not serve stale prices. In edit mode (Hermitage), results get Edit and Delete buttons, checked against information block permissions.
Keys on the storefront
The module's server key (API key or installation key) never reaches a page. The storefront reaches AACSearch in one of two ways:
- Directly, with a browser key. The widget, the assistant chat and
UI=Yblocks use a key the module mints withPOST /browser-keys. It is search-scoped and limited to the site's collections and origins. It expires after at most seven days, and the hourly health agent renews it when less than two days remain. Its state is shown on the Widgets page. - Through the site. Server-rendered components query AACSearch from PHP.
Voice and image uploads go to
/bitrix/tools/aac.search/media.php, and the widget proxy lives at/aacsearch/api/. Each of these is rate limited per IP and accepts only a fixed set of actions.
The browser never gets a full key, and never calls the search engine directly.
Widgets without editing the template. On the Widgets page,
auto-injection (widget_autoinject, on by default in classic mode) adds one
script to every public page. The script attaches suggestions to the standard
bitrix:search.title box and replaces bitrix:search.page results with the
widget's. Pages that already use aacsearch:instant.search are left alone. If
autodetection misses, the selectors can be set by hand.
Smart filter
There are two ways to get facet counts from AACSearch.
Drop-in, no template changes. On Native search, Calculate the smart
filter in AACSearch (native_filter, off by default; the Smart filters
switch in installation mode) installs a thin subclass of the native component
into /local/components/bitrix/catalog.smart.filter. Bitrix resolves the
component there first, under the same bitrix:catalog.smart.filter call. The
subclass loads the core class and component file and replaces only the facet
source, so templates, markup and parameters stay the core's.
- Enumerable properties are counted by AACSearch, taking the visitor's current selection into account. Ranges (price, numeric properties) stay with the core.
- Counts arrive only for information blocks exported to AACSearch; others show native numbers.
- If the platform fails or a property is unknown, the filter still renders with the native counts.
- If another override already exists at that path, the module does not overwrite it and warns you. Clearing the box removes the subclass.
The neighbouring option, Select catalog products in AACSearch
(native_catalog), installs subclasses of catalog.section, catalog.top,
catalog.element and news.list the same way. The index picks the page of
products, and the core still loads the elements and checks activity, dates and
permissions. If an information block is not exported, a sort cannot be
reproduced or the platform is down, the core does the selection.
Component. aacsearch:smart.filter renders its own form from the platform's
facets. Next to aacsearch:search.results it takes the facets through the
FACETS parameter and makes no extra request. On a section page, where no
results are next to it, it queries AACSearch itself.
SEO filter pages
- SEO pages → filter page meta tags stores rules per information block.
Each rule has title, description and similar templates with placeholders such
as
#SECTION#,#PROPERTY#,#VALUE#,#SECTION_CODE#and#SITE_DIR#. A rule containing an unknown placeholder is not saved. aacsearch:seo.filterrenders a landing page for a filter combination. It looks up the prepared page for the current URL (orURL), and sets the title, description, keywords, robots and<link rel="canonical">before<head>is printed. A combination is materialised lazily on its first visit, so its meta tags apply from the second visit.- Page addresses use the human-readable filter form
(
/catalog/noutbuki/filter/brend-lenovo/apply/), built from the site directory, with the filter values sorted. The same conditions always give the same URL. - The SEO pages admin page lists the generated pages, runs bulk generation
and an audit, and exports a sitemap file.
aacsearch:seo.linksshows links to related filter pages.
Voice search
aacsearch:voice.search adds a microphone button. The browser records the
audio and posts it to /bitrix/tools/aac.search/media.php. The module sends it
to POST /collections/{collection}/documents/search/by_voice with its server
key and returns the transcript and the hits. The button is shown only when all
of these hold:
- Voice search is enabled (
enable_voice_search, off by default); - the plan includes
voice_searchand there are credits (voice is billed per audio minute, see credits); - the page is served over HTTPS (browsers do not give microphone access otherwise).
Recommendations
aacsearch:recommendations shows a block for PRODUCT_ID of the chosen
RECOMMENDATION_TYPE: similar, also_bought, personal, trending or
recently_viewed. It requires enable_recommendations.
- With
UI=Y(the default) the block is the platform element<aacsearch-recommendations>. It renders in the browser from platform models, using the browser key. - With
UI=N, or when no browser key is available, the module fetches the ids on the server and builds the cards from Bitrix (CardReader), with live prices and access checks.
The wizard provisions the models with fixed ids bitrix_<strategy>, so running
it again does not duplicate them: similar → looking_similar, also-bought →
bought_together, personal → session, trending → trending. Recently
viewed is the visitor's own history, not a model. aacsearch:similar.products
finds similar items from the search index by name and properties.
Troubleshooting
Start with Services → AACSearch → Diagnostics. It runs the checks (connection, environment, edition, information blocks, permissions, queue, secrets and the export route) and says what to fix. It also has Restore agents, Encrypt now and Complete the installation buttons. Then read Log: filter by level ("this and more severe"), source and text. Export refusals, failed API calls and secret errors all land there.
| Symptom | Where to look / cause |
|---|---|
| Nothing is sent after install | no key yet — the module is idle until a key is set |
| Queue page: "More than an hour — the queue is not moving" | agents are not running: check Settings → Agents, use Restore agents, or set up queue_worker.php in cron |
| Queue page: "A bulk operation is in progress" | a 1C exchange or bulk edit; only urgent rows are sent until it settles |
| Diagnostics: export route is direct import | no connector configured — create one in Sources (provider bitrix) or rerun the wizard |
Wizard: a bitrix connector already exists and the local secret is lost | paste the id and secret from Sources into the Security tab |
| "Copy the complete aac_install_… installation key from Console." | the pasted key is incomplete or is not an installation key |
| Installation error: the site or source from Console is not found, or the site is connected to another installation | publish only discovered stores and sources; one site belongs to one installation |
| Installation error about widgets | Show AACSearch widgets is not supported with an installation key yet — turn it off and publish again |
Source in console shows Invalid connector signature. | wrong secret, or the server clock is more than five minutes off |
Source shows pull failed (…) / pull_url and pull_token are required for pull mode | the pull URL is unreachable, or the token does not match the module's Access token |
| Smart filter counts stay native | the information block is not exported, the property is a range, or a foreign override of the component exists (warning on Native search) |
| Voice button missing | not HTTPS, the feature is off, or the plan or credits do not include voice |
| Items disappear from search after maintenance | they were written by direct import rather than through the connector journal; configure the connector and reindex |
Support: support@aacsearch.com.
CMS connectors
Which shop platforms sync into AACSearch, how a connector authenticates, what it sends, push and pull sync, CMS installations, where the console shows sync status, and the limits.
Yandex Market YML feeds
Import a product catalog from a YML feed of any size — by URL, by file upload, or inline — into a collection that is created for you.