Try our conversational search powered by Generative AI!

EPiServer Find Auto Suggest



I have a question reagrding search suggestions.

Is it possible to implement auto suggest using EPiServer Find?

I checked the Find SDK and there is an example for auto complete which is totally understandable.

I just want to know if it is possible to suggest variants without doing a search.

Thank you.

Feb 16, 2015 21:41

Hello Islam

Using Find to provide autocomplete search results is certainly possible. The code below can be used to provide a suggested list of results for Name property of the Foo type:

public JsonResult Prefix(string term)
    var results = client.Search<Foo>()
        .Filter(x => x.Name.PrefixCaseInsensitive(term))
        .Select(x => x.Name)

    return Json(results.Select(x => x), JsonRequestBehavior.AllowGet);

Simply add the code above to a controller to use in your client side javascript.


Feb 17, 2015 0:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.