changed api for custom indexing
Merge pull request #2175 from maggiolo00/custom-index

changed api for custom indexing