Troy Wical wrote on 6/25/10 12:57 AM:
> On Jun 24, 2010, at 6:43 PM, Peter Karman wrote:
>>
>> I don't use swish.cgi myself, but my reading of it suggests that if you
>> configure it correctly (c.f. lines 380-400 or so) the "search all" is the
>> default if no index is selected.
>>
>> How have you configured it?
>
I'm sorry, I haven't had time to try this out.
Bill, do you have any memories of the right way to do this?
> .swishcgi.conf
> ####################################################
> use lib ( '/usr/local/lib/swish-e/perl' );
>
>
> return {
> title => 'Search Documentation',
> page_size => 20,
> swish_binary => '/usr/bin/swish-e',
> #display_props => [qw/ swishtitle swishdocpath /],
> secondary_sort => [qw/swishlastmodified desc/],
> swish_index => ['/home/www/search/engrs-wiki.index', '/home/www/search/devcenter.index', '/home/www/search/kernel-arch.index', '/home/www/search/quicksearch-code.index', '/home/www/search/acronyms.index', '/home/www/search/noc-wiki-howto.index', '/home/www/search/noc-wiki.index'],
> select_indexes => {
> method => 'checkbox_group',
>
> labels => [ 'ENGRS Wiki', 'Devcenter', 'Kernel', 'Code QuickSearch', 'Acronyms', 'NOC Wiki(HowTo) ', 'NOC Wiki(All)' ], # Must match up one-to-one to swish_index
> description => 'Select site(s): ',
> }
> }
> #####################################################
>
>
> swish.cgi (line 380 - 404)
> #####################################################
> # If you specify more than one index file (as an array reference) you
> # can set this allow selection of which indexes to search.
> # The default is to search all indexes specified if this is not used.
> # When used, the first index is the default index.
>
> # You need to specify your indexes as an array reference:
> #swish_index => [ qw/ index.swish-e index.other index2.other index3.other index4.other / ],
>
> Xselect_indexes => {
> # pick radio_group, popup_menu, or checkbox_group
> method => 'checkbox_group',
> #method => 'radio_group',
> #method => 'popup_menu',
>
> columns => 3,
> # labels must match up one-to-one with elements in "swish_index"
> labels => [ 'Main Index', 'Other Index', qw/ two three four/ ],
> description => 'Select Site: ',
>
> # Optional - Set the default index if none is selected
> # This needs to be an index file name listed in swish_index
> # above, not a label
>
> default_index => '',
> },
> #######################################################
>
> I played with default_index and select_indexes a bit but did not have much luck.
>
> Thanks, Troy
> _______________________________________________
> Users mailing list
> Users@lists.swish-e.org
> http://lists.swish-e.org/listinfo/users
--
Peter Karman . http://peknet.com/ . peter(at)not-real.peknet.com
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Tue Jun 29 22:13:42 2010