public IHttpActionResult Search([FromBody] string jsonText) { _log.DebugFormat("Search(): {0}", jsonText); // Deserialize the Request body into a EDismaxQuery instance. var edisMax = JsonConvert.DeserializeObject <EDismaxQuery>(jsonText); // Execute the query. SolrProxyResultSet result = _searchRepository.Execute <SearchResultItemWeb, SearchResultItemLiveWeb>(edisMax); // Serialize the header of the result set into the log. _log.DebugFormat("Search result: {0}", JsonConvert.SerializeObject(result.Header)); // Return as JSON. return(Json(result)); }