 |
|
 |
PicoSearch Professional and Premium accounts can get their search
results delivered in XML datafeed for no additional fee,
just contact us to activate the feature.
This will enable webservice datafeed support, so that your server can
call your PicoSearch engine directly and integrate the search results
any way that you wish into your website. This could include mixing the
search results with other dynamic information sources at your server. Or
your server could use the datafeed to generate different results page
designs beyond the abilities of PicoSearch's template system, which is
powerful but essentially supports one main design with limited dynamic
tweaking abilities, see Template FAQ.
If you're thinking of using XML just for the effect of hiding the
PicoSearch links behind your own scripts, you could be better
off with the Private Domain feature.
XML datafeed usage is not for beginners, of course. It takes some
programming experience to make server scripts, using whatever tools you
prefer. You might rely on a standard XML parser, or you could parse the
XML on your own. Either way it's important to look at the DTD specs and
usage as described below.
- There are two versions of the XML feed, either you can use.
- Once the XML option has been activated, then XML
results are returned whenever the xml=1 or xml=2 argument is supplied
with the query. Version 1 is xml=1, version 2 is xml=2. So your search
box code could include: <input type=hidden name=xml value=1> In a
URL call with cgi arguments, you would include: &xml=1
- Extra data can be returned with each search result by the PICOSEARCH_DATA tag, equivalently spelled as PICODATA. Just put this tag in your originating HTML page as a kind of PicoSearch feed meta data, and the UserData field will come back with your value in the XML feed for version 2 DTD.
<!-- PICOSEARCH_DATA name="UserData" value="my alphanumeric information..." -->
- The range of results returned is set by two things, (1) the doc0 arg
in the call and (2) the number of results set in your account manager's
Ranking Options feature. You can see doc0 in use in the next pages
links of non-XML search results. The connection with the XML results is
illustrated below:
- With &xml=1&doc0=0 (doc0 is also 0 by default)
<RangeShown lower="0" upper="10"/>
Showing results 1-10
- With &xml=1&doc0=10
<RangeShown lower="10" upper="20"/>
Showing results 11-20
So in RangeShown of the XML, lower=doc0, and (upper - lower)= number of results.
-
If your xml parser is being fussy about character encoding of the data feed, you can force the results to be in UTF-8 by caling with &outc=utf8 as another argument. Normally the datafeed will be in the encoding of your index (as indicated in the "Alternate Character Options" section of your account manager) because that will get displayed consistently by the browser in HTML within your template, for example as ISO-8859-1.
|
|
 |
|
 |