Context Completion Suggestor Issue using Nest in c#?

Hi All...

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

This is my audit trail and here is the query

var searchResponse = await highlevelclient.SearchAsync(s => s
.Suggest(su => su
.Completion("drugsuggest", cs => cs
.Contexts(co => co
cd => cd.Context(tenantId.ToString())))

I'm not getting the response

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


  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?

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