mcpField
B
bitrix-search

bitrix-search

github.com/bxmaximumDevelopment4778 installsUpdated 2w ago
Repository

About bitrix-search

A reference skill for developers implementing Bitrix search indexing and queries through the legacy `CSearch*` API. It documents module setup, indexing, reindexing, permissions, and search-engine behavior.

Key features

  1. 01Indexing entities and fields
  2. 02Handling rights and deletions
  3. 03Registering reindex handlers
  4. 04Querying with `CSearch::Search()`
  5. 05Configuring search engines

Use cases

  1. 01Adding custom entities to Bitrix search
  2. 02Building a full or module reindex flow
  3. 03Troubleshooting search permissions and URLs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix-search

After installing, type/bitrix-searchin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
engines.md
indexing.md
reindex.md
searching.md

Details

From the project README

Bitrix search module

Baseline: main 23.0+ · Verified: search 25.200.0, main 26.800.0

Ships in all editions (Site Management and Bitrix24). Legacy API only: CSearch* classes, no lib/, no D7 or ORM layer, no console commands.

TaskRead
Index own entities, fields, rights, delete, BeforeIndexrules/indexing.md
OnReindex handler, full/module reindex, CLI, stepsrules/reindex.md
search.page/search.title, CSearch::Search(), permissions, URL hooksrules/searching.md
Sphinx/OpenSearch/MySQL/PgSQL engines, stemming, custom rank, static filesrules/engines.md

Invariants

  • Loader::includeModule('search') before any CSearch* call; the module may be absent or uninstalled — indexing must not break your writes.
  • Keep CSearch behind one service in /local/modules/<vendor.module>/; entity events and the OnReindex handler both call it with the same field builder.
  • Index key is (MODULE_ID, ITEM_ID); use your module id, never iblock or main.
  • Always pass SITE_ID, PERMISSIONS and DATE_CHANGE; items without rights are visible to admins only, G2 means everyone including anonymous.
  • Register search:OnReindex persistently with your module id (installer), not via runtime addEventHandler().
  • Search from web context: CSearch::Search() needs $USER and fatals in agents.

Comments

Markdown supported