added search/counter api,also start working on second index for pb protocol