...
Pagination Object
Code Block | ||
---|---|---|
| ||
"Pagination": { "NofResults": 173, "CurrentPage": 1, "Items": [ { "Label": "12 Items Per Page", "PageSize": 12, "IsDefault": true, "Selected": true }, { "Label": "24 Items Per Page", "PageSize": 24, "IsDefault": false, "Selected": false }, { "Label": "36 Items Per Page", "PageSize": 36, "IsDefault": false, "Selected": false }, { "Label": "72 Items Per Page", "PageSize": 72, "IsDefault": false, "Selected": false } ], "MaxPerPage": 12, "NofPages": 15 } |
...
If Location is not blank, a Redirect Rule generated a target URL for the visitor to go to.
Code Block |
---|
"location": ""
|
...
XML
Using the sample engine, you can access the XML response via this URL:
...
VB.Net Code Sample
Code Block | ||
---|---|---|
| ||
Dim qs As URLParameters = New URLParameters(HttpContext.Current.Request.QueryString, "ajax;json;guid;PageId") Dim HawkSearchUrl As String = “http://dev.hawksearch.net/sites/enginename” Dim URL As String = HawkSearchUrl & "/" & qs.ToString() Dim r As HttpWebRequest = WebRequest.Create(URL) If Request IsNot Nothing Then r.UserAgent = Request.UserAgent r.Headers.Add("HTTP_TRUE_CLIENT_IP", Request.UserHostAddress) End If Dim myCache As New System.Net.CredentialCache() myCache.Add(New Uri(URL), "Basic", New System.Net.NetworkCredential(AppSettings("WindowsAuthLogin"), AppSettings("WindowsAuthPassword"))) r.Credentials = myCache Dim resp As System.Net.HttpWebResponse = r.GetResponse() Dim sr As New System.IO.StreamReader(resp.GetResponseStream()) Dim html As String = sr.ReadToEnd() sr.Close() |
...
SEO
In order to improve SEO on the site please make sure the search page has been added to the robots.txt on your site and disallowed so search engines do not reach it. There should always be a no index/no follow on the search pages. For improving SEO functionality on the site for popular search terms ask us more about the SEO Booster functionality we offer.
...
Info |
---|
To lookup the Engine Name and Tracking Key for your account please look in the Hawksearch workbench under Admin >> Account Info. |
Code Block | ||
---|---|---|
| ||
<!-- Hawksearch Header Includes --> <script type="text/javascript"> //<![CDATA[ (function (HawkSearch, undefined) { HawkSearch.HawkUrl = 'http://dev.hawksearch.net/sites/enginename'; HawkSearch.TrackingUrl = 'http://tracking-dev.hawksearch.net'; HawkSearch.RecommenderUrl = 'http://recs-dev.hawksearch.net'; HawkSearch.ClientGuid = 'tracking_key'; if ("https:" == document.location.protocol) { HawkSearch.HawkUrl = HawkSearch.HawkUrl.replace("http://", "https://"); HawkSearch.TrackingUrl = HawkSearch.TrackingUrl.replace("http://", "https://"); HawkSearch.RecommenderUrl = HawkSearch.RecommenderUrl.replace("http://", "https://"); } }(window.HawkSearch = window.HawkSearch || {})); var hawkJSScriptDoc = document.createElement("script"); hawkJSScriptDoc.async = true; hawkJSScriptDoc.src = HawkSearch.HawkUrl + '/includes/hawksearch.min.js?v1.0'; var hawkJSTag = document.getElementsByTagName('script')[0]; hawkJSTag.parentNode.insertBefore(hawkJSScriptDoc, hawkJSTag); var hawkCSSScriptDoc = document.createElement("link"); hawkCSSScriptDoc.setAttribute("rel", "stylesheet"); hawkCSSScriptDoc.setAttribute("type", "text/css"); hawkCSSScriptDoc.setAttribute("href", HawkSearch.HawkUrl + '/includes/hawksearch.css'); document.head.appendChild(hawkCSSScriptDoc); //]]> </script> |
...
Info |
---|
NOTE: In order to populate data in the Hawksearch Reports, and to leverage Personalized Search, it is CRITICAL to implement Tracking Integration. |
Click here for instructions on adding Hawksearch Event Tracking Code .