Setting up full-text search in 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Full-Text Search Setup for Bitrix CMS

Site search in Bitrix operates through the search module. During initial configuration, search either finds nothing (index not built), finds everything including service pages, or works slowly with large content volumes.

How Bitrix Search Works

The search module builds a full-text index in tables:

  • b_search_content — indexed content (titles, tags, body)
  • b_search_content_stem — stem index (word roots for morphology)
  • b_search_tag — search tags

Indexing happens automatically when saving elements (infoblocks, pages) through the OnSearchIndex event handler. Force reindexing via the administrative interface or an agent.

Configuring Search Sources

Settings → Search → Module Settings:

  • Save search history — useful for analytics
  • Morphology — enable for searching word forms ("buy", "bought", "purchase")
  • Characters in index — minimum word length for indexing (3 recommended)

Configuring indexed sources (Settings → Search → Reindexing):

  • Select infoblocks for indexing
  • Specify which properties to index
  • Exclude technical pages and service content

Search Component

$APPLICATION->IncludeComponent('bitrix:search.page', '', [
    'SITE_ID'          => 's1',
    'SEARCH_CACHE_TIME' => 3600,
    'DEFAULT_WORD'     => '',
    'MINIMAL_QUERY_LEN' => 3,
    'USE_SUGGEST'      => 'Y', // suggestions on input
    'arrFILTER'        => [    // search sources
        ['MODULE_ID' => 'iblock', 'PARAM1' => 'catalog', 'PARAM2' => 5],
        ['MODULE_ID' => 'iblock', 'PARAM1' => 'content'],
    ],
]);

Morphology and Relevance

Bitrix uses built-in stemming for Russian language. With morphology enabled, a query for "красные платья" (red dresses) will find "красное платье" (red dress) and "красный платья" (red dresses). The morphological index is built in b_search_content_stem.

Result relevance is managed by weights:

  • Word in title — high weight
  • Word in body — medium weight
  • Word in tag — medium weight

Weight settings: b_search_content.PARAM1 stores additional source parameters.

Reindexing and Performance

With a large catalog (50,000+ products), full reindexing takes significant time. Solutions:

  • Use incremental indexing (only changed elements)
  • Split reindexing into batches via an agent
  • For high-load projects, switch to an external solution (Elasticsearch + custom module)

Index status monitoring:

$rsSearch = CSearch::GetList('s1', ['SITE_ID' => 's1'], false, ['nTopCount' => 1]);
// Date of last index update

Implementation Timeline

Basic search setup with catalog and content indexing — 2–4 hours. Fine-tuning morphology, weights, and exclusions — 4–8 hours. Elasticsearch integration — 2–5 days.