Index


NAME

pgest-index.pl - create full-text index of some columns in your database

SYNOPSIS

  pgest-index.pl --create movies --sql "select id,title,year from movies"

  pgsql-index.pl --drop movies

Options:

--create name

Create index name and create triggers on table with same name

--drop name

Remove triggers from table name and node with same name

--node-url http://localhost:1978/node/name

Full URI to node. If it's not specified, it's assumed that you are using Hyper Estraier on http://localhost:1978/.

--sql "select col1,col2 from name"

SQL query which will return names of columns which are included in full-text index. Have in mind that you can't use aliases (as something) in this SQL query (or triggers will be created with wrong fields).

If SQL query isn't specified, default one select * from movies will be created. That will be serious performance hit if all columns are not needed for search.

--pk id

Specify name of primary key column in SQL query. If you allready have primary key on table or unique index and it consists of simgle column (compaund keys are not supported) it will be picked up automatically.

If you specify value which is not unique, you will get just last occurence of that item in index (which might be what you want). That's because specified pk column will be used for @uri in Hyper Estraier.

If name of primary key begins with _ it will not be added into text indexing (so you won't be able to find prmary key value, but it will still be available as attribute value).

--user login
--passwd password

Username and password to use when connecting to Hyper Estraier. If not specified, admin and admin will be used.

--debug

Dump debugging output. It may be specified multiple times for more verbose debugging.

SEARCHING

At end of each run, this script will output example search SQL query on STDOUT.

You can use it to quickly construct queries for your application.

AUTHOR

Dobrica Pavlinusic <dpavlin@rot13.org>

http://www.rot13.org/~dpavlin/

LICENSE

This product is licensed under GNU Public License (GPL) v2 or later.