Fix for Type Id based search for solr

Currently solr search with type restriction is not working. It is happening because search expression for this type of search is not constructed correctly. This fix makes sure that correct expression is created (only for solr).