> - If you can add a test infrastructure that will do the search operation both in the old and new indexer and then does a comparison that would serve as a fast check for new feature adoption.
> Let the infrastructure be generic, and you can add tests which uses the new indexer and then compare with the old indexer operations. The same can be documented here as well [JDT Developer's guide]
I never adopted the index in SearchEngine so I can't do this for searches yet. However, I've already implemented something like this for the index-as-a-type-cache feature. If you enable the following trace option, the indexer will read back every type it writes to the index and compare it with the original:
org.eclipse.jdt.core/debug/index/selftest=true
...which validates that there is no externally-visible difference whether that type was read from the index or from disk.
I'm not sure I'll have time to implement this, but it would also be possible to do something for type hierarchies. If you look at the implementation of IndexBasedHierarchyBuilder.searchAllPossibleSubTypes, you'll see that there's two branches separated by a call to JavaIndex.isEnabled(). Rather than running one-branch-or-the-other, you could run both and compare their results.