Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Autocomplete suggestion for complete word not only on prefix

$
0
0

Hello,

I have implemented Episerver Find autocomplete functionality using Jquery/Ajax

<script language="javascript">
$(document).ready(function () {
$("#search").autocomplete({
source: function (request, response) {
$.ajax({
url: "/find_v2/_autocomplete?prefix=" + request.term + "&size=5",
dataType: "jsonp",
contentType: 'application/json; charset=utf-8',
success: function (data) {
response($.map(data.hits, function (item) {
return {
value: item.query
};
}));
}
});
},
minLength: 2
});
});</script>

When I type ho in search box I get following results 

homeland

homemade

homesecurity

homemaid

homemaker

but I am getting search results on prefix...

Is there any way or workaround so that I can get suggestions for completed word.

Example: If I search for me  in search textbox I should get following results

homeland

homemade

homesecurity

homemaid

homemaker

I want autocomplete suggestion to work for all characters 


Viewing all articles
Browse latest Browse all 6894

Trending Articles