# Context Completion Suggestor Issue using Nest in c#?

**URL:** <https://discuss.elastic.co/t/context-completion-suggestor-issue-using-nest-in-c/143171>\
**Category:** Elasticsearch\
**Created:** [August 6, 2018, 1:16pm UTC](https://discuss.elastic.co/t/context-completion-suggestor-issue-using-nest-in-c/143171 "2018-08-06T13:16:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [August 6, 2018, 1:16pm UTC](https://discuss.elastic.co/t/context-completion-suggestor-issue-using-nest-in-c/143171/1 "2018-08-06T13:16:05Z")

</div>

Hi All...

I'm facing issue with context based compeltion suggestor.Query is successful and the count is returning zero.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d2e1696aa9586aef7ec62fe7099960b469f2152a.png)

This is my audit trail and here is the query

> var searchResponse = await highlevelclient.SearchAsync(s =\> s  
> .Index("drug2")  
> .Type("doc")  
> .Suggest(su =\> su  
> .Completion("drugsuggest", cs =\> cs  
> .Field("drugsuggest")  
> .Prefix(text)  
> .Contexts(co =\> co  
> .Context("tenantid",  
> cd =\> cd.Context(tenantId.ToString())))  
> )  
> )  
> );

I'm not getting the response

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 7, 2018, 11:23pm UTC](https://discuss.elastic.co/t/context-completion-suggestor-issue-using-nest-in-c/143171/2 "2018-08-07T23:23:32Z")

</div>

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with `</>` icon. Check the preview window.

Also, please enclose code in `</>` to retain formatting; it makes the question much easier to read and approachable.

--

The audit trail indicates that the request is valid so I suspect that the issue is likely one of two things,

1. There are no results that match the query

or

1. The query is syntactically correct, but is wrong e.g. should the targeted field be `drugSuggest` as opposed to `drugsuggest`?

It's difficult to be sure without knowing your data or how it is mapped. Can you share your mapping for `doc` type in `drug2` index?

---

<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:** [September 4, 2018, 11:23pm UTC](https://discuss.elastic.co/t/context-completion-suggestor-issue-using-nest-in-c/143171/3 "2018-09-04T23:23:38Z")

</div>

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