Fixed search to support querying from search index while selecting form mongodb.