If I am reading this right, you are getting everything in `index_id_list` that is not in `db_id_list` and `index_id_list`, right? If so, would it be better to use the built in set operators, like this?

```python
index_id_list = set(item[0] for item in cls.search().values_list('id').all())
index_id_list -= db_id_list
```