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
- 01Indexing entities and fields
- 02Handling rights and deletions
- 03Registering reindex handlers
- 04Querying with `CSearch::Search()`
- 05Configuring search engines
Use cases
- 01Adding custom entities to Bitrix search
- 02Building a full or module reindex flow
- 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-searchAfter installing, type/bitrix-searchin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
rules/engines.mdindexing.mdreindex.mdsearching.mdDetails
From the project READMEBitrix 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.
| Task | Read |
|---|---|
Index own entities, fields, rights, delete, BeforeIndex | rules/indexing.md |
OnReindex handler, full/module reindex, CLI, steps | rules/reindex.md |
search.page/search.title, CSearch::Search(), permissions, URL hooks | rules/searching.md |
| Sphinx/OpenSearch/MySQL/PgSQL engines, stemming, custom rank, static files | rules/engines.md |
Invariants
Loader::includeModule('search')before anyCSearch*call; the module may be absent or uninstalled — indexing must not break your writes.- Keep
CSearchbehind one service in/local/modules/<vendor.module>/; entity events and theOnReindexhandler both call it with the same field builder. - Index key is (
MODULE_ID,ITEM_ID); use your module id, neveriblockormain. - Always pass
SITE_ID,PERMISSIONSandDATE_CHANGE; items without rights are visible to admins only,G2means everyone including anonymous. - Register
search:OnReindexpersistently with your module id (installer), not via runtimeaddEventHandler(). - Search from web context:
CSearch::Search()needs$USERand fatals in agents.
Comments
Markdown supported