Configurable adapter

Fixes issue with double indexing and adds search adapter functional tests.
+1