Declarative rules in algoliasearch_django

Is there a way to manage query rules within the declarative structure of an algoliasearch-django index, so the index rules are recreated every time reindex_all is run? Looking at the code, it seems like we can only persist existing rules on an index and not create new ones, but I’m hoping there is a way around that.
I could probably figure out an imperative way to do it by overriding reindex_all but it seems silly when every other configuration is set declaratively.
The thing I wanted to do was something like

class ProductIndex(AlgoliaIndex):
rules = [{
    'objectID': 'empty-query-rule',
    'condition': {
        'pattern': '',
        'anchoring': 'is',
        'alternatives': 'false'
    },
    'consequence': {
        'promote': get_promoted_products(),
        'filterPromotes': True
    }
}]

Hi @rgraber!

Indeed it’s not possible to set them at creation time. However, saving rules on a non-existing index will automatically create it. You can refer to that page of our Python client https://www.algolia.com/doc/api-reference/api-methods/save-rule/#examples to see how to create a rule if needed. Hope it helps!