---
title: "Getting Started with Elasticsearch, Part 2 - Searching with a HttpClient"
url: https://daily.dev/posts/getting-started-with-elasticsearch-part-2---searching-with-a-httpclient-cigbvm3aq
source_url: https://nodogmablog.bryanhogan.net/2020/09/getting-started-with-elasticsearch-part-2-searching-with-a-httpclient
type: article
source: "No Dogma Blog (Bryan Hogan)"
published: 2026-05-31T07:46:33.883Z
updated: 2026-05-31T09:09:55.178Z
tags: ["c#", "rest-api", "elk", "full-text-search"]
reading_time: 4
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started with Elasticsearch, Part 2 - Searching with a HttpClient

**[No Dogma Blog \(Bryan Hogan\)](https://daily.dev/sources/bryanhogan)** · 4 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide to querying Elasticsearch from a .NET application using a typed HttpClient instead of the official Elasticsearch client libraries. Covers creating a typed client interface with three search methods (by company name, by name and state, and paginated all-results), wiring it up via HttpClientFactory in Startup.cs, and exposing the searches through an ASP.NET Core API controller with constructor injection.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nodogmablog.bryanhogan.net/2020/09/getting-started-with-elasticsearch-part-2-searching-with-a-httpclient>

## Similar posts on daily.dev

- [How to Streamline Search in Web Applications with Elasticsearch](https://daily.dev/posts/how-to-streamline-search-in-web-applications-with-elasticsearch-pes6btyfs) · freeCodeCamp · 2 upvotes · 1 comments

---

Tags: [#c#](https://daily.dev/tags/c#), [#rest-api](https://daily.dev/tags/rest-api), [#elk](https://daily.dev/tags/elk), [#full-text-search](https://daily.dev/tags/full-text-search)

[View this post on daily.dev](https://daily.dev/posts/getting-started-with-elasticsearch-part-2---searching-with-a-httpclient-cigbvm3aq)
