Bill Moseley wrote:
>
> I hope that's enough to get you going.
>
Thanks for the config setup and debugging tips. They helped me find a
couple of set up problems very quickly.
I feel a bit foolish. I did have a really old version of the script. I
went and located the one that really did come with the distribution,
changed the paths to my locations for the swish-e binary, index.swish-e
and .swishcgi.conf. The command line execution and debugging look fine
to me, and while the CGI script doesn't produce errors, I still get no
results.
I'm still indexing just the one HTML file. My indexing config file
looks like:
> IndexContents HTML2 .shtml .html .htm
> IndexOnly .html .shtml
> #ParserWarnLevel 2
> StoreDescription HTML2 <body> 200
I set up a .swishcgi.conf file that looks like:
return {
Swish_Binary => '/usr/daac/dev/bin/swish-e',
Swish_Index => '/usr/daac/doc/internal/web/index.swish-e',
};
and even though the dump indicated the .swishcgi.conf was being read,
swish.cgi couldn't find the binary or index file until I changed them
directly in the script (for the moment, just a side issue).
Here's the full dump. I'm not quite sure how to go about examining the
processing of the swish.cgi to find the problem. I don't see anything
in the error_log. Thanks for any advice you can offer.
daacdev2$ export SWISH_DEBUG=dump; $DAACDIR/cgi-bin/swish.cgi > /dev/null
Debug level set to: 33
---------- Read config parameters from
'/usr/daac/dev/etc/.swishcgi.conf' ------$VAR1 = {
'Swish_Index' => '/usr/daac/doc/internal/web/index.swish-e',
'Swish_Binary' => '/usr/daac/dev/bin/swish-e'
};
-------------------------
Debug level set to: 33
Enter a query [all]: web
Enter max results to display [1]: 3
------------- Results structure passed to template ------------
$VAR1 = bless( {
'_results' => [
{
'swishdescription' => ' ... for
Swish-e Indexing Reports (Bobby, Compliance, Links) Policies (<font
style="background:#FFFF99">Web</font> page requirements, Development
Checklists) MDST Checklist <font style="background:#FFFF99">Web</font>
Page Tools (weblint, tidy, bobby) <font
style="background:#FFFF99">Web</font> Information (<font
style="background:#FFFF99">Web</font> dir',
'swishlastmodified' => '2002-10-04
13:03:00 EDT',
'swishdocsize' => 1316,
'swishdocpath_href' => 'index.html',
'swishrank' => 1000,
'swishtitle' => 'Test Page for
Swish-e Indexing',
'swishdocpath' => 'index.html',
'saved_swishdocpath' => 'index.html',
'swishreccount' => 1
}
],
'_headers' => {
'swish format' => '2.2.1',
'maintained by' => '(no maintainer)',
'description' => '(no description)',
'name' => '(no name)',
'number of hits' => 1,
'maxwordlimit' => 40,
'counts' => '48 words, 1 files',
'search time' => '0.001 seconds',
'begincharacters' =>
'0123456789abcdefghijklmnopqrstuvwxyz?????????????????????????????????????????????????????????????????',
'wordcharacters' =>
'0123456789abcdefghijklmnopqrstuvwxyz?????????????????????????????????????????????????????????????????',
'fuzzy indexing mode' => 'None',
'parsed words' => 'swishdefault = (
web ) ',
'documentproperties' => 'Enabled',
'endcharacters' =>
'0123456789abcdefghijklmnopqrstuvwxyz?????????????????????????????????????????????????????????????????',
'stemming applied' => '0',
'saved as' => 'index.swish-e',
'index file' =>
'/usr/daac/doc/internal/web/index.swish-e',
'run time' => '0.109 seconds',
'ignoretotalwordcountwhenranking' => 1,
'search words' => 'swishdefault=(web)',
'minwordlimit' => 1,
'indexed on' => '2002-10-04 19:04:39 EDT',
'swish-e format' => '2.2.1',
'soundex applied' => '0',
'pointer' => '(no pointer)'
},
'hits' => 1,
'query_href' =>
'/usr/daac/dev/cgi-bin/swish.cgi?query=web',
'query_match' => {
'text' => {
'swishdefault' => [
[
'web'
]
]
}
},
'prog' => '/usr/daac/dev/bin/swish-e',
'my_url' => '/usr/daac/dev/cgi-bin/swish.cgi',
'navigation' => {
'showing' => 1,
'search_time' => '0.001 seconds',
'hits' => 1,
'to' => 1,
'from' => 1,
'run_time' => '0.109 seconds'
},
'DateRanges_time_low' => undef,
'query_simple' => 'web',
'DateRanges_time_high' => undef,
'config' => {
'description_prop' => 'swishdescription',
'max_chars' => 500,
'highlight' => {
'highlight_on' =>
'<font style="background:#FFFF99">',
'occurrences' => 6,
'show_words' => 10,
'max_words' => 100,
'package' =>
'PhraseHighlight',
'meta_to_prop_map' => {
'all' => [
'swishtitle',
'swishdescription',
'swishdocpath'
],
'swishtitle' => [
'swishtitle'
],
'swishdefault' => [
'swishtitle',
'swishdescription'
],
'swishdocpath' => [
'swishdocpath'
]
},
'highlight_off' =>
'</font>'
},
'Swish_Index' =>
'/usr/daac/doc/internal/web/index.swish-e',
'date_ranges' => {
'date_range' => 1,
'line_break' => '0',
'property_name' =>
'swishlastmodified',
'default' => 'All',
'time_periods' => [
'All',
'Today',
'Yesterday',
'This Week',
'Last Week',
'Last 90 Days',
'This Month',
'Last Month'
]
},
'swish_index' =>
'/usr/daac/doc/internal/web/index.swish-e',
'name_labels' => {
'all' => 'All',
'swishdocsize' =>
'Document Size',
'subject' => 'Message
Subject',
'swishdefault' =>
'Title & Body',
'swishdocpath' =>
'Document Path',
'name' => 'Poster\'s
Name',
'sent' => 'Message Date',
'swishlastmodified'
=> 'Last Modified Date',
'swishrank' => 'Rank',
'swishtitle' => 'Title',
'email' => 'Poster\'s
Email'
},
'meta_groups' => {
'all' => [
'swishdefault',
'swishtitle',
'swishdocpath'
]
},
'title_property' => 'swishtitle',
'debug' => 33,
'title' => 'Search our site',
'display_props' => [
'swishlastmodified',
'swishdocsize',
'swishdocpath'
],
'no_last_page_navigation' => '0',
'on_intranet' => '0',
'Xselect_indexes' => {
'description' =>
'Select Site: ',
'labels' => [
'Main Index',
'Other Index',
'two',
'three',
'four'
],
'columns' => 3,
'method' =>
'checkbox_group'
},
'Swish_Binary' =>
'/usr/daac/dev/bin/swish-e',
'xtemplate' => {
'options' => {
'cache'
=> 1,
'die_on_bad_params' => '0',
'filename' => 'swish.tmpl',
'loop_context_vars' => 1
},
'package' =>
'TemplateHTMLTemplate'
},
'swish_binary' =>
'/usr/daac/dev/bin/swish-e',
'no_first_page_navigation' => '0',
'timeout' => 10,
'metanames' => [
'swishdefault',
'swishtitle',
'swishdocpath'
],
'secondary_sort' => [
'swishlastmodified',
'desc'
],
'config_file' =>
'/usr/daac/dev/etc/.swishcgi.conf',
'max_query_length' => 100,
'sorts' => [
'swishrank',
'swishlastmodified',
'swishtitle',
'swishdocpath'
],
'page_size' => 3,
'Xselect_by_meta' => {
'description' =>
'Limit search to these areas: ',
'values' => [
'misc',
'mod',
'vhosts',
'other'
],
'labels' => {
'vhosts' => 'Virutal hosts',
'mod' => 'Apache Modules',
'misc' => 'General Apache docs'
},
'metaname' => 'site',
'columns' => 3,
'method' =>
'checkbox_group'
}
},
'q' => bless( {
'.charset' => 'ISO-8859-1',
'.parameters' => [
'query'
],
'.fieldnames' => {},
'query' => [
'web'
]
}, 'CGI' ),
'MOD_PERL' => undef,
'COMMAND' => '/usr/daac/dev/bin/swish-e -w
swishdefault=(web) -b 1 -m 3 -f /usr/daac/doc/internal/web/index.swish-e
-s swishrank desc swishlastmodified desc -x
<swishreccount>\\t<swishtitle>\\t<swishdescription>\\t<swishlastmodified>\\t<swishdocsize>\\t<swishdocpath>\\t<swishrank>\\t<swishdocpath>\\n
-H 9',
'metaname' => 'swishdefault',
'swish_command' => [
'-w',
'swishdefault=(web)',
'-b',
1,
'-m',
3,
'-f',
'/usr/daac/doc/internal/web/index.swish-e',
'-s',
'swishrank',
'desc',
'swishlastmodified',
'desc',
'-x',
'<swishreccount>\\t<swishtitle>\\t<swishdescription>\\t<swishlastmodified>\\t<swishdocsize>\\t<swishdocpath>\\t<swishrank>\\t<swishdocpath>\\n',
'-H',
9
]
}, 'SwishQuery' );
--------------------------
> Is .shtml a server generated page?
yes, we designate web pages using server side includes with .shtml
Received on Fri Oct 4 23:41:38 2002