# Simple Search by field query

**URL:** <https://discuss.elastic.co/t/simple-search-by-field-query/264879>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 19, 2021, 3:53pm UTC](https://discuss.elastic.co/t/simple-search-by-field-query/264879 "2021-02-19T15:53:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [February 19, 2021, 3:53pm UTC](https://discuss.elastic.co/t/simple-search-by-field-query/264879/1 "2021-02-19T15:53:07Z")

</div>

I'm using the C# library to query a string in my cluster, but keep getting back results thats outside the string i want to search for. I basically want something on the lines of 'Select \* where field = 'some value'

In fluent, how is this accomplished cause my test arent retrieving the desired results. also, how can one use the .keyword ext?

This is what i currently have...  
.Query(q =\> q  
.Bool(m =\> m  
.Must(t =\> t  
.Match(f =\> f.Query(nsID).Field(fie =\> fie.nS2ID).Operator(Operator.And)) && ,,,,,

I just want to search for documents in the NS2ID field that matches the nsID i pass it.

Any insight would be helpful

Thanks,

---

<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:** [March 19, 2021, 3:53pm UTC](https://discuss.elastic.co/t/simple-search-by-field-query/264879/2 "2021-03-19T15:53:28Z")

</div>

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