head	1.7;
access;
symbols
	rel-2-4-3a:1.7
	rel-2-4-3:1.7
	rel-2-4-2:1.5
	rel-2-4-1:1.5
	rel-2-4-0-patches:1.5.0.2
	rel-2-4-0:1.5;
locks; strict;
comment	@# @;


1.7
date	2004.11.18.00.41.43;	author whmoseley;	state Exp;
branches;
next	1.6;

1.6
date	2004.11.08.19.44.21;	author whmoseley;	state Exp;
branches;
next	1.5;

1.5
date	2003.06.08.21.52.05;	author augur;	state Exp;
branches;
next	1.4;

1.4
date	2003.04.16.03.01.51;	author whmoseley;	state Exp;
branches;
next	1.3;

1.3
date	2003.03.10.18.04.46;	author whmoseley;	state Exp;
branches;
next	1.2;

1.2
date	2002.10.21.04.41.43;	author whmoseley;	state Exp;
branches;
next	1.1;

1.1
date	2002.10.14.23.51.53;	author whmoseley;	state Exp;
branches;
next	;


desc
@@


1.7
log
@
1) updated SWISH::API to work with swish-config

2) added -lswish-e to swish-config and pkg-config libs

Think the -g and other options should not be included?
That is, should @@CFLAGS@@ be include?

3) Minor fix to API.xs
@
text
@SWISH::API - Perl interface to the Swish-e C search library

$Id: README,v 1.6 2004/11/08 19:44:21 whmoseley Exp $

DESCRIPTION
-----------

SWISH::API is an Object Oriented Perl interface to the swish-e C library. This can be used
to embed the swish-e search code into your perl program avoiding the need to run the swish-e
binary for searching.

The real difference is that search speed is improved since you may attach to a swish-e index
once and then run many queries on that open "swish handle".  This speed comes at a cost of
memory added to your program.

Note: This module replaces the SWISHE module available with versions prior to
2.3 of Swish-e.  It's recommended to upgrade your Perl code to use the
SWISH::API module.


INSTALLATION
------------

See the FAQ below if you do not have root access or installed swish in a non-standard
directory.

1) Download, build and install swish-e

    See http://swish-e.org for instructions.

    Swish is also available as a binary package from some
    operating system distributions (e.g. Debian).

2) Build the module in the normal way

    perl Makefile.PL
    make
    make test

Makefile.PL requires the "swish-config" program which is created when installing
swish-e.  It must reside in the same directory as the swish-e binary.  See below
if installing swish-e in a non-standard location.


FAQ
---

1) I do not have root access.  How do I link to the swish-e library?

When building the SWISH::API module the compiler and linker look in locations for header and
library files.  If swish was installed in a non-standard location you will need to specify
that location when building the module.

For example, to install *swish* in $HOME/local:

   $ ./configure --prefix=$HOME/local
   $ make && make install

Now build SWISH::API

   $ cd perl

Makefile.PL has to find the "swish-config" program.  It does this normally by searching
your PATH environment variable:

   $ PATH=$HOME/local/bin:$PATH perl Makefile.PL

another way is to specify the path with the SWISHBINDIR parameter:

   $ perl Makefile.PL SWISHBINDIR=$HOME/local/bin

(or as an environment variable)

   $ SWISHBINDIR=$HOME/local/bin perl Makefile.PL

Since you don't have root access, you should also specify where to install the
SWISH::API perl module by using the PREFIX parameter:

   $ perl Makefile.PL SWISHBINDIR=$HOME/local/bin PREFIX=$HOME/my_perl_lib

Note, that you can also specify LIBS and INC to override the settings that the
swish-config program reports.  If you have a reason to do this then you probably
already know how to override these settings.


2) How do I build a PPM under Windows using MSVC and PERL 5.8?

   $ cd perl

   $ perl Makefile.PL \
     LIBS="../src/win32/libswish-e-mt.lib ../../zlib/lib/zlib.lib libcmt.lib" \
     OPTIMIZE="-MT -Zi -DNDEBUG -O1 -I../src"

   # Logic says to use CCFLAGS for -I../src but it explodes spectacularly...

   $ nmake
   $ nmake ppd

   $ tar cvzf SWISH-API.tar.gz blib

Edit SWISH-API.ppd to your liking and upload it and SWISH-API.tar.gz to your repository in the appropriate locations.

PROBLEMS
========

If you have problems or need help please contact the swish-e discussion list.  The list is
low traffic and is the place to get help with this module or swish-e in general.


@


1.6
log
@
Updated Makefile.PL to look for swish in $PATH or in SWISHBIN (environment var or
Makefile.PL parameter).
@
text
@d3 1
a3 1
$Id: README,v 1.5 2003/06/08 21:52:05 augur Exp $
d16 3
a18 11
Note: This module replaces the SWISHE module available with versions prior to 2.3 of
Swish-e.  There is a SWISHE interface module available on the Swish-e site if you have
existing code that depends on previous versions of the SWISHE module.

    http://swish-e.org/Download/SWISHE-0.03.tar.gz

That version is simply an interface to the SWISH::API module.  You must install the
SWISH::API module to use SWISHE-0.03.tar.gz.

It's recommended to upgrade your Perl code to use the SWISH::API module directly instead of
using the SWISHE-0.03 interface module if possible.
d40 3
a42 24

Makefile.PL will attempt to find the swish-e binary in the path.  If swish-e cannot be
found the the script will abort.  Be careful that the version found in the path is the
version you are linking against.  Otherwise, update your PATH or use SWISHBIN.

If swish-e is not in your path then you can specify at build time like this:

    perl Makefile.PL SWISHBIN=$HOME/local/bin/swish-e

SWISHBIN may also be an environment variable.  Bourne-type of shells can do:

    SWISHBIN=$HOME/local/bin/swish-e perl Makefile.PL

The first form (on the command line) will override environment variables.

Other options are:

    perl Makefile.PL SWISHSKIPTEST=1

Will not run noraml test code when running "make test".

    perl Makefile.PL SWISHHELP=1

Display help.
d48 1
a48 1
I do not have root access.  How do I link to the swish-e library?
d59 1
d61 1
a61 1
Now to build the SWISH::API module:
d63 8
a70 1
   $ cd perl
d72 1
a72 3
   $ perl Makefile.PL PREFIX=$HOME/local \
     CCFLAGS=-I$HOME/local/include \
     LIBS="-L$HOME/local/lib -lswish-e"
d74 1
a74 1
   $ LD_RUN_PATH=$HOME/local/lib make
d76 2
a77 1
   $ make test && make install
d79 1
a79 1
Remember, use SWISHBIN if your locally installed swish-e binary is not in your PATH.
d81 3
a83 2
That last line above is bourne shell syntax.  Other shells may use a different syntax for
setting the LD_RUN_PATH environment variable before running make.
a84 2
The "PREFIX" parameter to Makefile.PL sets where the module will be installed when running
"make install".
d86 1
a87 1
How do I build a PPM under Windows using MSVC and PERL 5.8?
d104 1
a104 1
--------
@


1.5
log
@Added instructions for building PPM under Windows.
@
text
@d3 1
a3 1
$Id: README,v 1.4 2003/04/16 03:01:51 whmoseley Exp $
d49 3
a51 4
Note that running "perl Makefile.PL" will ask for the location of the swish-e binary.  Make
sure you specify the location of the swish-e binary that matches the version of swish-e you
are linking the module with (i.e. from the same package as the SWISH::API perl module).  Be
aware that many ISPs have outdated versions of swish-e installed.
d53 1
d55 17
d83 1
a83 1
For example, to install swish in $HOME/local:
d86 1
a87 1
   $ make && make install
d94 1
a94 1
     CCFLAGS=-I$HOME/local/include \   
d101 2
d130 1
a130 1
low traffic and is the place to get help with this module or swish-e in general.   
@


1.4
log
@Older perl issue with spider.pl, docs in swish.cgi
@
text
@d3 1
a3 1
$Id: README,v 1.3 2003/03/10 18:04:46 whmoseley Exp $
d89 17
a105 1
   
@


1.3
log
@Installing in no-standard location example
@
text
@d3 1
a3 1
$Id: README,v 1.2 2002/10/21 04:41:43 whmoseley Exp $
d78 1
a78 1
     LIBS="-lz -L$HOME/local/lib -lswish-e"
@


1.2
log
@

Make updates to the perl module -- basically to make it work
with the previous SWISHE module.

I uploaded to the swish-e download page a new version of SWISHE perl module
that is just a front end for the SWISH::API interface.  I believe
it can be used as a drop in replacement.
@
text
@d3 1
a3 1
$Id: README,v 1.1 2002/10/14 23:51:53 whmoseley Exp $
d6 1
d8 11
a18 12
SWISH::API is an Object Oriented interface to the swish-e C library.
This can be used to embed the swish-e search code into your perl program
avoiding the need to run the swish-e binary for searching.

The real difference is that search speed is improved since you may
attach to a swish-e index once and then run many queries on that open
"swish handle".  This speed comes at a cost of memory added to your program.

Note: This module replaces the SWISHE module available with versions prior
to 2.3 of Swish-e.  There is a SWISHE interface module available
on the Swish-e site if you have existing code that depends on 
previous versions of the SWISHE module.
d22 6
a27 2
That version is simply an interface to the SWISH::API module.  You
must install the SWISH::API module to use SWISHE-0.03.tar.gz.
d30 4
d49 42
d92 1
d94 2
a95 5
    If you have problems or need help please contact the swish-e
    discussion list.  The list is low traffic and is the place
    to get help with this module or swish-e in general.
    
    
@


1.1
log
@
New Perl module -- docs have not been edited yet!
@
text
@d3 1
a3 1
$Id: README,v 1.5 2002/08/26 05:46:20 moseley Exp $
d15 9
@

