Site Search
sitemap • search tips • faqs 
LOG-IN
SUBSCRIBE
PACKAGES
FEATURES
CUSTOMERS
ABOUT US
SUPPORT
Frequently Asked Question #52
How do I implement my subscription using XML?
First, make sure you have selected XML as your template option by referencing the following FAQ.
After making this selection, whenever a call is made to the FusionBot servers, your results will be returned as XML, rather than standard HTML. Therefore, you will be required to make the XML call behind the scenes, parse and format your search results, and display them to the user.

To construct the initial call to the FusionBot server, copy the content within the FORM ACTION component of your HTML code for inserting the search box. It will appear similar to the following:

http://ssSERVER.fusionbot.com/cgi-bin/ss_query

Where SERVER is equal to the server number in which your index is hosted.

Add to this line the value of the hidden field sitenbr from within the FORM. This value uniquely identifies your index, and must always be passed whenever a query is conducted:

http://ssSERVER.fusionbot.com/cgi-bin/ss_query?sitenbr=NUMBER

Followed by the appropriate value of the search terms entered, defined as keys by FusionBot.

http://ssSERVER.fusionbot.com/cgi-bin/ss_query?sitenbr=NUMBER&keys=[search terms]

Please note that when populating the keys variable, to URL encode this value. Also, the brackets should not be included in the actual call as part of keys.

Lastly, when formulating additional calls based on the user's position within the search results, the variable pos must be populated with the current page number / position within the search results.

Here's an actual URL call constructed for the search results on FusionBot, for the keyword "packages", returning the second page of results:

http://ss002.fusionbot.com/cgi-bin/ss_query?sitenbr=124122&keys=packages&pos=2

If you have implemented a mini-portal using the default, This Site, Related Sites, Both labels for your search box, and would like to specify which section of your index to search against, via a drop down selection box or radio buttons, the following additional variable must be passed:

related=X

Where the value of X depends on the particular section of your index you wish to search against:

related=0, Search onsite content only (FB_THIS_SITE)
related=1, Search offsite content only (FB_MINIPORTAL)
related=2, Search ALL content (FB_ALL)

If you have customized your search box using the Search Partitions configuration form, the order in which you have entered your unique region labels should correspond to the value passed for the "related" variable, starting with 0.

If you have specified multiple search partitions within your regions configuration form, you must include another querystring variable, rgn (short for "region"), specifying which partition (region) the values of "related" should pertain to. The value of the rgn variable should be set equal to the value of the region name applied toward each custom partition. If no rgn value is passed, the default / first partition in your configuration form will be used.

Thus, if your second partition is constructed like the following:

<support>
"This Site" FB_THIS_SITE
"PDF Documents Only" http://www.yoursite.com/pdfs/
"Press Releases" http://www.yoursite.com/press/
</support>

And you wanted to search against the PDF Documents Only section in the support region, the following additional values need to be included in your XML call:

&rel=1&rgn=support

Where rel is set to a value of 1 since it is the second entry in the Support partition, and the value of rgn is set to support since this region / partition has been labeled support.

If you wish to modify / allow the user to specify the default sort order of your search results, include the srt variable in your XML call, where:

srt=0 (default, sort by relevancy)
srt=1 (sort by date)

The default character set specified on the initial <xml> line of output is ISO-8859-1:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>

To specify a different character set value for your XML output returned by FusionBot pass in the following:

chr=charset

Where charset is the value of the character set to assign.

Finally, you can create an advanced search feature, whereby your visitors can specify stemming to be enabled, by passing:

stm=1

Please note, however, stemming must be disabled within your account settings for this to work.

This is the basic syntax of the query call to FusionBot. Your <FORM> must therefore be modified to make a call to your local program first, it should then parse the request, and make the call to FusionBot behind the scenes using a similar URL to the sample constructed above.

Once FusionBot receives your request, XML data will be returned for the specific keywords searched and position passed, giving you the capability to parse and format this data however you desire.

Now that you can receive your data in XML, you will need to understand the content within the FusionBot XML feed. View our XML documentation to better understand the XML tags and their associated attributes returned by the FusionBot XML feed.


If you did not find an answer to your question, please return to the Support Page and fill out the form provided.


 Featured Customers:
  • Coca-Cola Enterprises
  • Rezidor Hotel Group
  • Covenant Health Products
  • American Electric Power
  • Everywherechair
  • Fleet Safety Equipment, Inc.
  • HandsOnTools
  • Chemglass Life Sciences
  • MerckSerono
  • R-JetTek Inkjet Technology Solutions
  • Madison Gas and Electric
  • TwitterGadget
  • True Beer
  • Galaxy.com
  • Capital Tractor
  • adamanta
  • BBQ Island Outdoor Products
  • Battery Clerk
  • DCU - Digital Federal Credit Union
  • BJJ Sports
  • National Center for Missing and Exploited Children

[Subscribe to FusionBot - Site Search & Sitemap Solutions]
Copyright 1998 - 2016 LOGIKA Corporation. All rights reserved.
[about site search] [advertising] [build vertical search engine] [reseller program] [popular searches] [top clicks] [terms of use] [uptime]