Revert "Functions for indexing attributes"

This reverts commit a6221546c4549e89960c9479300267c55a41c8dd.
Revert "Revert "Functions for indexing attributes""

This reverts commit 6b67eea4ed566808f00d0798a40185443575e0f3.