use `as_indexed_json` instead of `to_indexed_json`
update CHANGELOG
refactor as_indexed_json and cleanup
add DEBUG to specs
fix specs
fix filter specs