# How can I implement this with the latest Elasticsearch C# client version, v8?

**URL:** https://discuss.elastic.co/t/how-can-i-implement-this-with-the-latest-elasticsearch-c-client-version-v8/350951
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [January 12, 2024, 12:49pm UTC](https://discuss.elastic.co/t/how-can-i-implement-this-with-the-latest-elasticsearch-c-client-version-v8/350951 "2024-01-12T12:49:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Silwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_silwal/32/130752_2.png) [@David\_Silwal](https://discuss.elastic.co/u/David_Silwal)
#### Post date: [January 12, 2024, 12:49pm UTC](https://discuss.elastic.co/t/how-can-i-implement-this-with-the-latest-elasticsearch-c-client-version-v8/350951/1 "2024-01-12T12:49:04Z")

</div>

How can I implement this with the latest Elasticsearch C# client version, v8?

````auto
var searchResponse = elasticClient
.Search<Case>(s => s
.Index(IndexNames.Cases)
.Query(q => q
.Match(m => m
.Field("Description")
.Query(queryParameterDto.SearchString)
)
||
q.Match(m => m
.Field("Title")
.Query(queryParameterDto.SearchString)
)
&& q
.Match(m => m
.Field(f => f.Title)
.Query("Cam")
) && q
.DateRange(r => r
.Field(f => f.IncidentOn)
.GreaterThanOrEquals(new DateTime(2017, 01, 01))
.LessThan(new DateTime(2018, 01, 01))```
````

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 9, 2024, 12:49pm UTC](https://discuss.elastic.co/t/how-can-i-implement-this-with-the-latest-elasticsearch-c-client-version-v8/350951/2 "2024-02-09T12:49:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
