Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download

SWISH-CONFIG - Configuration File Directives

Swish-e version 2.4.7

Table of Contents


OVERVIEW

This document lists the available configuration directives available in Swish-e.

CONFIGURATION FILE

What files Swish-e indexes and how they are indexed, and where the index is written can be controlled by a configuration file.

The configuration file is a text file composed of comments, blank lines, and configuration directives. The order of the directives is not important. Some directives may be used more than once in the configuration file, while others can only be used once (e.g. additional directives will overwrite preceding directives). Case of the directive is not important -- you may use upper, lower, or mixed case.

Comments are any line that begin with a "#".

    # This is a comment

As of 2.4.3 lines may be continued by placing a backslas as the last character on the line:

    IgnoreWords \
        am \
        the \
        foo

Directives may take more than one parameter. Enclose single parameters that include whitespace in quotes (single or double). Inside of quotes the backslash escapes the next character.

    ReplaceRules append "foo bar"   <- define "foo bar" as a single parameter

If you need to include a quote character in the value either use a backslash to escape it, or enclose it in quotes of the other type.

Backslashes also have special meaning in regular expressions.

    FileFilterMatch pdftotext "'%p' -" /\.pdf$/

This says that the dot is a real dot (instead of matching any character). If you place the regular expression in quotes then you must use double-backslashes.

    FileFilterMatch pdftotext "'%p' -" "/\\.pdf$/"

Swish-e will convert the double backslash into a single backslash before passing the parameter to the regular expression compiler.

Commented example configuration files are included in the conf directory of the Swish-e distribution.

Some command line arguments can override directives specified in the configuration file. Please see also the SWISH-RUN for instructions on running Swish-e, and the SWISH-SEARCH page for information and examples on how to search your index.

The configuration file is specified to Swish-e by the -c switch. For example,

    swish-e -c myconfig.conf

You may also split your directives up into different configuration files. This allows you to have a master configuration file used for many different indexes, and smaller configuration files for each separate index. You can specify the different configuration files when running from the command line with the -c switch (see SWISH-RUN), or you may include other Configuration file with the IncludeConfigFile directive below.

Typically, in a configuration file the directives are grouped together in some logical order -- that is, directives that control the source of the documents would be grouped together first, and directives that control how each document is filtered or its words index in another group of directives. (The directives listed below are grouped in this order).

The configuration file directives are listed below in these groups:

  • Administrative Headers Directives -- You may add administrative information to the header of the index file.

  • Document Source Directives -- Directives for selecting the source documents and the location of the index file.

  • Document Contents Directives -- Directives that control how a document content is indexed.

  • Directives for the File Access method only -- These directives are only applicable to the File Access indexing method.

  • Directives for the HTTP Access Method Only -- Likewise, these only apply href="if you do not have root access or you want to install the modules in a local library. If you do use a PREFIX setting, add a use lib statement to the top of this swish.cgi program.

    For example:

        use lib qw(
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0
            /home/bmoseley/perl_lib/lib/site_perl/5.6.0/i386-linux/
        );

    Once the stemmer module is installed, and you are using a stemmed index, the swish.cgi script will automatically detect this and use the stemmer module.

DISCLAIMER

Please use this CGI script at your own risk.

This script has been tested and used without problem, but you should still be aware that any code running on your server represents a risk. If you have any concerns please carefully review the code.

See http://www.w3.org/Security/Faq/www-security-faq.html

Security on Windows questionable.

SUPPORT

The SWISH-E discussion list is the place to ask for any help regarding SWISH-E or this example script. See http://swish-e.org.

Before posting please review:

    http://swish-e.org/2.2/docs/INSTALL.html#When_posting_please_provide_the_

Please do not contact the author or any of the swish-e developers directly.

LICENSE

swish.cgi $Revision: 1830 $ Copyright (C) 2001 Bill Moseley search@hank.org Example CGI program for searching with SWISH-E

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

AUTHOR

Bill Moseley

./usr/share/doc/swish-e/html/swish-config.html0000644000000000000000000035072211276145372020223 0ustar rootroot Swish-e :: SWISH-CONFIG - Configuration File Directives
Skip to main content.
home | support | download