[ic] Setting up swish-e to search static pages

Ton Verhagen tverhagen at alamerce.nl
Mon Feb 7 15:03:25 EST 2005

>Quoting Gary Norton <gnorton at broadgap.com>:
>Ton Verhagen wrote:
>>Quoting Gary Norton <gnorton at broadgap.com>:
>>>I have a customer who has several static pages (specifically PDF's) on 
>>>their site that they would like to be able to search. I would like to 
>>>use the swish-e engine for this via the Vend::Swish module.
>>>I have added:
>>>Require module Vend::Swish
>>>AddDirective Swish hash
>>>Variable swish Vend::Swish
>>>in my interchange.cfg (as well as uncommented the ::logDebug statements 
>>>in the Swish.pm). Swish-e is also installed on the server.
>>>Can someone give me some direction in setting this up? I am not quite 
>>>sure what the next step should be. Do I need to make catalog specific changes?
>>>Also, if there is a better way you recommend doing this, I am open to ideas.
>>Brief how-to Swish:
>>1. Install Swish-e on your server
>>2. Create a Swish-e configuration file (where to find files, which files 
>>to index, etc.)
>>3. Run Swish-e and generate an index file (e.g. pages.index)
>>4. Tell Interchange catalog where to find said file
>>Add fthe following line to catalog.cfg:
>>Swish index products/pages.index
>Thank you. I was missing "Swish index products/pages.index" in the 
>catalog.cfg .
>For reference of others reading I also had to add:
>Swish command /usr/bin/swish-e
>Gentoo portage installed to a different location than the default used by 
>>5. Add Swish capability to Interchange.
>>Add the following lines to interchange.cfg:
>>Require module Vend::Swish
>>AddDirective Swish hash
>>Variable swish Vend::Swish
>>6. Restart IC server
>>7. Create a search: Interchange ITL and st=swish
>I was missing st=swish as well.
>>8. Display the results: Interchange ITL
>>See the documentation that comes with Swish-e
>>Good luck !
>This is working now. Thank you very much for your help. I do have one more 
>question however. Do you know of a way to reference the returned results 
>by name? Currently I am using [item-pos 0] [item-pos 1] etc. It would make 
>for more readable code if there were names I could reference. I have tried 
>the names that I though would work (looked inside Swish.pm) but they don't 
>seem to work.

The following parameters are available in a search list:

So, on a results page you could do:

[item-param code] -- [item-param score]  -- [item-param title] -- 
[item-param url] -- [item-param mod_date] -- [item-param filesize]

Best regards,


Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    info at alamerce.nl    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting 

More information about the interchange-users mailing list