2

I'm trying to implement the search suggest for my gsa search box as is described in http://code.google.com/apis/searchappliance/documentation/612/xml_reference.html#QuerySuggestionServicesuggestProtocol

I was having an issue integrating the javascript file that they mention ss.js as apparently the file is not very lint friendly.

I looked at http://briancaos.wordpress.com/2010/07/16/gsa-google-search-appliance-suggest-using-c-and-jquery/ and they offer an alternate solution of using a jquery plugin.

I looked around and it doesn't seem like there are too many references to how to implement this ss.js file. I was wondering if anyone could give me an extra information as to which one might be better to use and why.

This is a .net project using C#.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user800612
  • 169
  • 2
  • 9

1 Answers1

0

For the sake of completing this Question. You can use Jquery Autocomplete plugin. All you need to do is pass keyword to this URL http://GSA_HOST/suggest?q=<query>&max=<num>&site=<collection>&client=<frontend>&access=p&format=os You will get Different types of JSON response based on format , pick one that is comfortable. Now in Jquery part

$("#search_box_id").autocomplete(
                      "/my_autocomplete_server_side_handler",
                      {
                        minChars:2,
                        loadingClass:"loading",
                        autoFill:true
                      }
            );

Some autocomplete plugins require data reponse to be in unique format , like term1|term2|term3 , Check your autocomplete man pages.

GoodSp33d
  • 6,252
  • 4
  • 35
  • 67