Elasticsearch.Net and Nest 6.4.2
I am trying to implement completion suggestor in ASP.NET.
However, I am getting an exception error
Error converting value "200 1/2 E 111TH PL" to type 'Nest.CompletionField'. Path suggest.completion#address-suggest[0].options[0]._source.street_addr', line 29, position 50.
Here is my controller
var responsedata = _connectionToEs.EsClient().Search<address>(s => s
.Index("address5")
.Suggest(ss => ss
.Completion("address-suggest", cs => cs
.Field(f => f
.street_addr)
.Prefix(phrase)
.Fuzzy(f => f
.Fuzziness(Fuzziness.Auto)
)
.Size(5)
)
));
Here is my POCO
public class address
{
public CompletionField street_addr { get; set; }
}
My objective is to do autocomplete for addresses. Can anyone tell me what is wrong?