title: TFS 2018, code search and work item search returns error: Unexpected error in search service
body: <p>I have upgraded to the <code>TFS 2018 PRE PROD</code> server migrating the <code>OLD TFS 2015</code> Update 3 databases from a Prod environment. </p>
  
  <p>I have added an application tier server to the configuration, so i have two app tier. I have taken the secondary app server and configured the search feature.</p>
  
  <p>The configuration is done using the <code>UI</code> of <code>TFS 2018</code>. The configuration seems to be ok as there was no error. </p>
  
  <p>Now when I went and tried searching Work Items or Code i get the below error n whatever I search:</p>
  
  <blockquote>
    <p>There was a problem processing your request.   Unexpected error in
    search service.</p>
  </blockquote>
  
  <p>Do i need to do additional configuration post the search service configuration?</p>
  
  <p><b>Update</b>: I can see the below error in the application tier eventlog:</p>
  
  <p>ExceptionType Microsoft.VisualStudio.Services.Search.Common.SearchPlatformException </p>
  
  <p>Message Microsoft.VisualStudio.Services.Search.Common.SearchPlatformException: ElasticSearch Response is invalid ---> System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse() at Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData) --- End of inner exception stack trace --- at Microsoft.VisualStudio.Services.Search.Platforms.SearchEngine.Implementations.ElasticSearchPlatform.ValidateQueryResponse[T](IVssRequestContext requestContext, ISearchResponse<code>1 queryResponse, IEnumerable</code>1 requestIndices) at Microsoft.VisualStudio.Services.Search.Platforms.SearchEngine.Implementations.ElasticSearchPlatform.Search[T](IVssRequestContext requestContext, EntitySearchPlatformRequest request, EntityType entityType) at Microsoft.VisualStudio.Services.Search.Query.CodeSearchQueryForwarder.ForwardSearchRequest(IVssRequestContext requestContext, SearchQuery searchQuery, IEnumerable`1 indexInfo, IExpression scopeFiltersExpression, String requestId, DocumentContractType contractType) at Microsoft.VisualStudio.Services.Search.WebServer.CodeSearchControllerBase.HandlePostCodeQueryRequest(IVssRequestContext requestContext, SearchQuery query, Boolean isSecurityChecksEnabled, Boolean isCustomProjectSecurityCheckEnabled) </p>