Skip to main content
Version: 1.28 (Current)

Remove Records

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, Search

Deletes records from the index of a search behavior, so they no longer show up in search results. Filters decide which records are deleted. Without filters, every record in the behavior's index is deleted.

Only the index changes. The content itself, such as a database row, a page or a file, isn't touched.

note

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​

  • Remove a record from search right after it's deleted from its table
  • Remove all records of one database indexing rule, for example before indexing it again
  • Remove records with a custom data value, such as a status of Archived

Don't use it to​

  • Rebuild a whole index. Use Index Behavior with Full Reindex.
  • Hide records from some users. Set the permissions of the content or of the database indexing rule instead. See Search Index Rules.
  • Delete data from a table. Use Run SQL Query.
Action NameDescription
Perform SearchSearches a behavior's index. Run it with the same filters first to see what would be deleted.
Index RuleIndexes one database indexing rule right away. With Full Reindex, it also removes rows that no longer exist.
Index BehaviorIndexes all content sources of a behavior.
Execute ActionsGroups actions and catches errors.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Behavior IDThe search behavior whose index is changed. Pick it from the list or enter its numeric ID, for example [BehaviorId].Yesempty stringYes
FiltersRows of Name and Value that the records to delete must match. Put several values for one name on separate lines. If there are no rows, all records are deleted. See Filters.YesemptyNo
Continue On ErrorWhen checked, the following actions keep running if the action fails. When unchecked, a failure stops execution and shows an error, unless an On Error action returns a result.NofalseNo
On ErrorActions to run if the removal fails. They can use the [Exception], [ExceptionType], [ExceptionMessage] and [ExceptionStack] tokens.NoemptyNo

Output Parameters Reference​

This action has no output parameters.

Filters​

The filters work like the filters of Perform Search. Different names must all match. The values of one name are alternatives. The most useful names are:

NameMatches
IdThe record's search key. For a database indexing rule it's avtsb.<Rule Name>-<ID>, for example avtsb.Customers-42.
SubTypeFor a database indexing rule, the rule name, for example Customers.
TypeThe kind of record, for example rule, mod, doc or url.
datefrom, datetoThe published date range. Only the first value is used. Without dateto, the range ends now.
Any other nameA custom data field, for example status. The value must match exactly, including case.

Both the name and the values can contain tokens. Names aren't case-sensitive. The behavior's own filters, set in the Settings tab, are applied too.

Considerations​

  • Guard against empty filters. If a filter's value is empty, for example because a token is empty, that filter is skipped. The action can then delete far more than you expect: for a user who isn't an administrator, every record they can find in search. Add a condition such as [CustomerId] != "".
  • Who runs it matters. When a user who isn't an administrator runs the action with filters, only records that user could find in search are deleted. Without filters, everything is deleted, whoever runs it.
  • Test with Perform Search. Run Perform Search with an empty search term and the same filters to see which records match.
  • Records can come back. If the content still exists, it's indexed again the next time it changes, or on a full reindex. Delete or soft-delete the source first.
  • Numeric built-in fields. Filtering ModuleId, TabId, Author or ContainerId by a number doesn't match anything, so nothing is deleted. Use Id or SubType instead.
  • Errors. A non-numeric or unknown Behavior ID fails the action before Continue On Error and On Error apply. Repeating the same filter name in two rows is an error that they do catch. Put the values on separate lines instead.
  • Web farms. If the index writer isn't available on the server that runs the action, nothing is deleted and no error is shown.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Remove one record after deleting it​

This action removes the record of customer [CustomerId], indexed by the Customers database indexing rule, from behavior 1. The condition stops it from running with an empty ID.

{
"Title": "Remove Records",
"ActionType": "SearchBoost.RemoveRecords",
"Description": "Remove the deleted customer from search",
"Condition": "[CustomerId] != \"\"",
"Parameters": {
"BehaviorId": "1",
"Filters": [
{
"FilterName": "Id",
"FilterValues": "avtsb.Customers-[CustomerId]"
}
],
"ContinueOnError": true,
"OnError": []
}
}

2. Remove archived records and log errors​

This action removes the records of the Customers rule whose status custom data is Archived or Closed. If it fails, the error is logged and execution continues.

{
"Title": "Remove Records",
"ActionType": "SearchBoost.RemoveRecords",
"Description": "Remove archived customers",
"Parameters": {
"BehaviorId": "[BehaviorId]",
"Filters": [
{
"FilterName": "SubType",
"FilterValues": "Customers"
},
{
"FilterName": "status",
"FilterValues": "Archived\nClosed"
}
],
"ContinueOnError": true,
"OnError": [
{
"Title": "Log Error",
"ActionType": "LogError",
"Description": "Log the error",
"Parameters": {
"Message": "Remove Records failed: [ExceptionMessage]"
}
}
]
}
}

Revised 09/27/2026