# My matchPhrase nest query is not working as matchphrase raw json

**URL:** <https://discuss.elastic.co/t/my-matchphrase-nest-query-is-not-working-as-matchphrase-raw-json/112960>\
**Category:** Elasticsearch\
**Created:** [December 22, 2017, 7:30am UTC](https://discuss.elastic.co/t/my-matchphrase-nest-query-is-not-working-as-matchphrase-raw-json/112960 "2017-12-22T07:30:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASM](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@ASM](https://discuss.elastic.co/u/ASM)\
**Post date:** [December 22, 2017, 7:30am UTC](https://discuss.elastic.co/t/my-matchphrase-nest-query-is-not-working-as-matchphrase-raw-json/112960/1 "2017-12-22T07:30:13Z")

</div>

Hi

I have a match Phrase Nest query as given below

sd = new SearchDescriptor();  
sd.From(0);  
sd.Size(10);

sd.Query(q =\>  
q.MatchPhrase(m =\> m  
.Field(p =\> p.title)  
.Query("Test Article in Credit")  
));  
The above query gives me two documents

while if I extract raw query json from it and test using fiddler as below  
{  
"query": {  
"match\_phrase": {  
"title": {  
"query": "Test Article in Credit"  
}  
}  
}  
}

then I get 5 documents

I am not sure what I am missing in my nestclient query.....Could anybody provide any direction

---

<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:** [January 19, 2018, 7:30am UTC](https://discuss.elastic.co/t/my-matchphrase-nest-query-is-not-working-as-matchphrase-raw-json/112960/2 "2018-01-19T07:30:25Z")

</div>

Closed on January 19, 2018, 7:30am UTC

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