In some cases you may want to index many new products being released as part of a new campaign that will be launched in the future. At the same time you don't want those products to be seen before the actually launch date.
You can use conditionless rules to add default search parameters to filter out these new records. This would require an attribute value on all your records that could be filtered on for the purpose of new campaign releases. For example, if all your records had the attribute "campaign". This campaign attribute could have values for each campaign you launch. Consider the example records below.
{
"name": "Harry Potter and the Sorcerer's Stone"
"campaign": "campaign_1"
}
{
"name": "Harry Potter and the Chamber of Secrets"
"campaign": "campaign_1"
}
{
"name": "Game of Thrones"
"campaign": "campaign_2"
}
{
"name": "A Clash of Kings"
"campaign": "campaign_2"
}
With these records we have 2 records from a previous campaign (campaign_1) for Harry Potter books that are now always visible. We've added new records to the index for the Game of Thrones books campaign (campaign_2) but we don't want them to be visible until our campaign is ready to launch. We can create a conditionless rule that filters out all records with the campaign attribute value "campaign_2" and then disable this rule when we are ready for these products to be seen.
For even more fine-grained control, you may specify validity windows on Rules (via the validity
attribute). Rules with validity windows only apply during the specified time frames; they’re ignored the rest of the time. So for example you could have the rule expire on the day you launch your campaign and allow those results to now be seen by your customers. More on this can be found here in our Turning Rules on and off documentation.