Implement search shards API

Closes #2726