November Happy Hour will be moved to Thursday December 5th.

episerver find autocomplete

Vote:
 
Hi,  
I'm trying to implement autocomplete functionality there with the help of this http://www.find.episerver.com/Documentation/stats-autocomplete. I'm not any getting results back. 

I even tried with find developer index, didn't any results (checked with webdugger -Fiddler). 

$(".headSearchBox").autocomplete({
        source: function (request, response) {
            $.ajax({
                dataType: "jsonp",
                data: {
                    q: request.term+"*",
                    size: 5,
                    df: "Title$$string.lowercase",
            fields: "Title$$string "
                },
                success: function (data) {
                   
                    response($.map(data.hits.hits, function (item) {
                        console.log(item.fields.Title$$string);
                        return {
                            label: item.fields.Title$$string,
                            value: item.fields.Title$$string
                            
                        };
                    }));
                }
            });
        },
        minLength: 2,
        appendTo: "#searchAutocompleteContainer"
    });

Could you give me any pointers on this ?
#84401
Apr 01, 2014 15:39
Vote:
 

Hi,

Strange as when I issue the same query (passing the params in the querystring) I do get results: 

http://es-api01.episerver.com/rB6AEIKHVIaicHpXocZIAyM6Htny09mz/suresh.siddagari_emintramarch2014/_search?q=B*&df=Title$$string.lowercase&fields=Title$$string

There is an extra whitespace in the fields param. Maybe that is causing the issue.

(happy to see that you didn't post your private key ;-))

Best Regards,
Henrik

#84435
Apr 02, 2014 8:53
Vote:
 

If you are using the autocomplete feature, described at http://www.find.episerver.com/Documentation/stats-autocomplete, you will need to add .Track to your queries in order to generate data that will be used for autocompletion. You could also add these manually in the Find area when logged on to EPiServer.

If you are doing a javascript-based search, directly against your index, do keep in mind that your index will be disposed, meaning that users may gain access to unpublished data. 


#84437
Edited, Apr 02, 2014 9:07
Vote:
 

Hi, thanks for your reply ! 

now, I'm getting response with service url ( with episerver SaaS url). 

But we have Find Enterprise installation on our local server, in that case http://localhost:9200/<indexname>/_autocomplete?prefix=ei is enough ? 

I tried with above request and didn't get any results back. 

Tack !

#84450
Apr 02, 2014 11:19
Vote:
 

Have you added .Track() to your "normal" queries? Autocomplete results are based on previous searches. http://find.episerver.com/Documentation/stats-tracking

#84453
Apr 02, 2014 12:01
Vote:
 

Hi, Added .Track() to queries. 

#84454
Apr 02, 2014 12:03
Vote:
 

Rembember that you have to do some actual queries in order to get results :-)

Did you also try to manually add autocomplete suggestions via the ui?

#84455
Apr 02, 2014 12:07
Vote:
 

Hi, I figured out the problem. Our site is running with https:// and the search box making a http:// call. 

Hope, I can solve this !

thanks !

#84456
Apr 02, 2014 12:10
* 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.