Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

swish::api::common(3pm) [debian man page]

SWISH::API::Common(3pm) 				User Contributed Perl Documentation				   SWISH::API::Common(3pm)

NAME
SWISH::API::Common - SWISH Document Indexing Made Easy SYNOPSIS
use SWISH::API::Common; my $swish = SWISH::API::Common->new(); # Index all files in a directory and its subdirectories $swish->index("/usr/local/share/doc"); # After indexing once (it's persistent), fire up as many # queries as you like: # Search documents containing both "swish" and "install" for my $hit ($swish->search("swish AND install")) { print $hit->path(), " "; } DESCRIPTION
"SWISH::API::Common" offers an easy interface to the Swish index engine. While SWISH::API offers a complete API, "SWISH::API::Common" focusses on ease of use. THIS MODULE IS CURRENTLY UNDER DEVELOPMENT. THE API MIGHT CHANGE AT ANY TIME. Currently, "SWISH::API::Common" just allows for indexing documents in a single directory and any of its subdirectories. Also, don't run index() and search() in parallel yet. INSTALLATION
"SWISH::API::Common" requires "SWISH::API" and the swish engine to be installed. Please download the latest release from http://swish-e.org/distribution/swish-e-2.4.3.tar.gz and untar it, type ./configure make make install and then install SWISH::API which is contained in the distribution: cd perl perl Makefile.PL make make install METHODS $sw = SWISH::API::Common->new() Constructor. Takes many options, but the defaults are usually fine. Available options and their defaults: # Where SWISH::API::Common stores index files etc. swish_adm_dir "$ENV{HOME}/.swish-common" # The path to swish-e, relative is OK swish_exe "swish-e" # Swish index file swish_idx_file "$self->{swish_adm_dir}/default.idx" # Swish configuration file swish_cnf_file "$self->{swish_adm_dir}/default.cnf" # SWISH Stemming swish_fuzzy_indexing_mode => "Stemming_en" # Maximum amount of data (in bytes) extracted # from a single file file_len_max 100_000 # Preserve every indexed file's atime atime_preserve $sw->index($dir, ...) Generate a new index of all text documents under directory $dir. One or more directories can be specified. $sw->search("foo AND bar"); Searches the index, using the given search expression. Returns a list hits, which can be asked for their path: # Search documents containing # both "foo" and "bar" for my $hit ($swish->search("foo AND bar")) { print $hit->path(), " "; } index_remove Permanently delete the current index. TODO List * More than one index directory * Remove documents from index * Iterator for search hits LEGALESE
Copyright 2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
2005, Mike Schilli <cpan@perlmeister.com> perl v5.10.0 2008-07-08 SWISH::API::Common(3pm)

Check Out this Related Man Page

SWISH-E(1)						       SWISH-E Documentation							SWISH-E(1)

NAME
Swish-e - A Search Engine SYNOPSIS
swish [-e] [-i dir file ... ] [-S system] [-c file] [-f file] [-l] [-v (num)] swish -w word1 word2 ... [-f file1 file2 ...] [-P phrase_delimiter] [-p prop1 ...] [-s sortprop1 [asc|desc] ...] [-m num] [-t str] [-d delim] [-H (num)] [-x output_format] swish -k (char|*) [-f file1 file2 ...] swish -M index1 index2 ... outputfile swish -N /path/to/compare/file swish -V See the the SWISH-RUN(1) man page for details on run-time options. DESCRIPTION
Swish-e is Simple Web Indexing System for Humans - Enhanced. Swish-e can quickly and easily index directories of files or remote web sites and search the generated indexes. Swish-e is extremely fast in both indexing and searching, highly configurable, and can be seamlessly integrated with existing web sites to maintain a consistent design. Swish-e can index web pages, but can just as easily index text files, mailing list archives, or data stored in a relational database. Swish is designed to index small to medium sized collection of documents, Although a few users are indexing over a million documents, typi- cal usage is more often in the tens of thousands. Currently, Swish-e only indexes eight bit character encodings. DOCUMENTATION
Documentation is provided as HTML pages installed in $prefix/share/doc/swish-e where $prefix is /usr/local if building from source, or /usr if installed as part of a package from your OS vendor. Under Windows $prefix is selected at installation time. Documentation is also available on-line at http://swish-e.org. A subset of the documentation is installed as system man pages as well. The following man pages should be installed: swish-e(1) This man page. SWISH-CONFIG(1) Defines options that can be used in a configuration file. SWISH-RUN(1) Describes the run-time options and switches. SWISH-FAQ(1) Answers to commonly asked questions. SWISH-LIBRARY(1) API for the Swish-e search library. Applications can link against this library. SUPPORT
Support for Swish-e is provide via the Swish-e discussion list. See http://swish-e.org for information. 2.4.7 2009-04-04 SWISH-E(1)
Man Page