If we update a field to be indexable there is no simple way to actually rebuild the index. Idem when removing the index, no way to delete stale data that would stay forever.
We could add these methods on fields:
rebuild_indexes (rebuild all indexes: equal and range)
rebuild_index(index_type="[equal|range]")
trash_indexes
trash_index
The rebuild should only work in there is an index defined on the field
The trash should only work if there is no index anymore
(Fields are accessible from the model via the get_field method)
And on the model:
rebuild_all_indexes
trash_all_indexes
Or maybe instead of rebuild/trash, only one that would manage both cases (cannot find a name right now)
If we update a field to be indexable there is no simple way to actually rebuild the index. Idem when removing the index, no way to delete stale data that would stay forever.
We could add these methods on fields:
The rebuild should only work in there is an index defined on the field The trash should only work if there is no index anymore
(Fields are accessible from the model via the
get_field
method)And on the model:
Or maybe instead of rebuild/trash, only one that would manage both cases (cannot find a name right now)