async Task <ILuceneQueryResult> QueryLuceneInternal(LuceneQuery query) { var response = await StartQuery(uriConstructor.GetQueryUri(query)); if (!response.IsSuccessStatusCode) { var error = new CouchError(parent.Settings.Serializer, response); error.ThrowDatabaseMissingExceptionIfNedded(uriConstructor); error.ThrowLuceneIndexNotFoundExceptionIfNedded(query); error.ThrowCouchCommunicationException(); } using (var reader = await response.Content.ReadAsUtf8TextReaderAsync()) return(LuceneQueryResultParser.Parse(reader, query)); }
async Task<ILuceneQueryResult> QueryLuceneInternal(LuceneQuery query) { var response = await StartQuery(uriConstructor.GetQueryUri(query)); if (!response.IsSuccessStatusCode) { var error = new CouchError(parent.Settings.Serializer, response); error.ThrowDatabaseMissingExceptionIfNedded(uriConstructor); error.ThrowLuceneIndexNotFoundExceptionIfNedded(query); error.ThrowCouchCommunicationException(); } using (var reader = await response.Content.ReadAsUtf8TextReaderAsync()) return LuceneQueryResultParser.Parse(reader, query); }