Index Behavior
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Search
Starts indexing a search behavior now, instead of waiting for its schedule. It does the same as the Index and Reindex buttons on the Search configuration page: all content sources of the behavior are read again, such as pages, files, URLs and database indexing rules.
The action only starts the work. It returns right away, and the content is indexed in the background.
This action requires the Search feature (Standard) to be licensed. If it isn't, the action fails with a message that the feature is unlicensed.
Typical Use Cases
- Index new content after an import, so it can be found without waiting for the schedule
- Rebuild the index of a behavior after changing its content sources or search settings
- Run indexing from a workflow or a scheduled job, for example when Disable Content Querying is on
Don't use it to
- Index a single database indexing rule. Use Index Rule instead, which is faster.
- Delete records from the index. Use Remove Records.
- Run it for every saved record. Each run reads all content sources. For frequent updates, use Index Rule.
Related Actions
| Action Name | Description |
|---|---|
| Index Rule | Indexes one database indexing rule right away. |
| Remove Records | Deletes records from a behavior's index. |
| Perform Search | Searches a behavior's index. |
| Execute Actions Asynchronously | Runs actions in the background. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Behavior ID | The search behavior to index. Pick it from the list or enter its numeric ID, for example [BehaviorId]. See Set Up Search Behaviors. | Yes | empty string | Yes |
| Scope | Incremental indexes content that changed since the last indexing. Full Reindex clears the behavior's index first, then indexes everything again. | No | Incremental | Yes |
| Bypass Queue | When checked, indexing starts right away on the server that runs the action, even if other behaviors are being indexed. When unchecked, the request is picked up by the indexing server within a second or so and waits its turn. Use it with care, since parallel indexing can slow the application down. | No | false | No |
| Restart If Already Running | When checked and the behavior is being indexed on this server, that indexing is stopped first, so the new run also picks up the newest content. The action waits for it to stop. | No | false | No |
Output Parameters Reference
This action has no output parameters.
What happens when it runs
| Scope | Bypass Queue | What happens |
|---|---|---|
| Incremental | Unchecked | The behavior is marked for indexing. The indexing server reads the content sources in the background. |
| Incremental | Checked | The content sources are read right away, in the background, on this server. |
| Full Reindex | Unchecked | The behavior is marked for reindexing. The indexing server clears the index, then reads all content. |
| Full Reindex | Checked | The index is cleared right away on this server, then all content is read in the background. |
Reading the content sources creates indexing jobs. The jobs are then written to the index in batches, every few seconds, so allow some time before the new content can be found. You can follow the progress in the Search Dashboard Tab.
Considerations
- Full Reindex empties the index first. Until indexing finishes, searches return few or no results. Prefer Incremental during working hours.
- Web farms. Indexing runs on the master server. Bypass Queue and Restart If Already Running act on the server that runs the action. See the server information in the Search Dashboard Tab.
- Errors. A non-numeric or unknown Behavior ID makes the action fail. Errors that happen during indexing are written to the log, not returned by the action.
- Don't run it in a loop. Each run reads every content source of the behavior. Run it once after a batch of changes.
Examples
To understand how to use the below examples, please see Running Examples.
1. Index new content after an import
This action asks for an incremental indexing of behavior 1.
{
"Title": "Index Behavior",
"ActionType": "SearchBoost.IndexBehavior",
"Description": "Index the imported content",
"Parameters": {
"BehaviorId": "1",
"ScopeType": "incremental",
"BypassQueue": false,
"RestartIfAlreadyRunning": false
}
}
2. Rebuild the index now
This action stops any indexing of the behavior in the BehaviorId token, clears its index and indexes all content again, right away.
{
"Title": "Index Behavior",
"ActionType": "SearchBoost.IndexBehavior",
"Description": "Rebuild the search index",
"Parameters": {
"BehaviorId": "[BehaviorId]",
"ScopeType": "full-reindex",
"BypassQueue": true,
"RestartIfAlreadyRunning": true
}
}
Revised 09/27/2026