Skip to content

Commit

Permalink
README renamed and updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Apr 23, 2011
1 parent 815ccda commit 4f09a2f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 35 deletions.
41 changes: 23 additions & 18 deletions LEGGIMI.italian_fts → LEGGIMI.rst
Expand Up @@ -35,32 +35,37 @@ include anche i file di installazione e configurazione del dizionario.
Prerequisiti
============

Il pacchetto � adatto all'installazione in database PostgreSQL versione 8.3.
Se si desidera utilizzare la ricerca full-text con versioni precedenti
di PostgreSQL si prega di riferirsi alla homepage_.
Il pacchetto è adatto all'installazione in database PostgreSQL versione 8.3 e
successive.

.. _homepage: http://www.develer.com/~piro/ispell-italian/

Installazione del package
=========================
Installazione del pacchetto
===========================

Espandi l'archivio del dizionario::
Usa il comando::

tar xzvf italian_fts-VERSION.tar.gz
sudo make install

Installa i file del dizionario nelle relative directory. Questo rende
il dizionario disponibile in tutti i database del cluser::
per installare i file del dizionario nelle directory di destinazione. Questo
comando utilizza il primo ``pg_config`` trovato nel ``PATH`` per leggere la
configurazione del database. Se vuoi specificare un diverso database puoi
usare la variabile ``PG_CONFIG`` per indicare un diverso programma::

cd italian_fts-VERSION
make install
sudo make PG_CONFIG=/path/to/pg_config install

Per installare il dizionario in un database (nell'esempio *mydict*)
puoi utilizzare il comando:

Per installare il dizionario in un database PostgreSQL con versione precedente
alla 9.1 puoi utilizzare il comando:

.. parsed-literal::
psql -f $(pg_config --sharedir)/italian_fts.sql *mydict*
psql -f $(pg_config --sharedir)/italian_fts/italian_fts.sql *nomedb*
La stessa directory contiene anche un file di disinstallazione.

In PostgreSQL 9.1 invece puoi usare i `comandi di gestione delle estensioni`__
per installare il dizionario::

CREATE EXTENSION italian_fts;

Questo modificher� la configurazione ``italian`` installata di default:
la nuova configurazione utilizzer� il vocabolario ISpell e ricadr�
sullo stemmer se una parola non viene riconosciuta.
.. __: http://developer.postgresql.org/pgdocs/postgres/extend-extensions.html
37 changes: 21 additions & 16 deletions README.italian_fts → README.rst
@@ -1,5 +1,5 @@
===================================
Italian Full-Text Search Dictionary
Italian Full-Text Search Dictionary
===================================

:Author: Daniele Varrazzo
Expand Down Expand Up @@ -35,31 +35,36 @@ Prerequisites
=============

This package can be used to install and configure the ISpell dictionary in
PostgreSQL 8.3 databases. To install the dictionary in older database versions,
please refer to the homepage_.

.. _homepage: http://www.develer.com/~piro/ispell-italian/
PostgreSQL 8.3 and later.


Package installation
====================

Unpack the dictionary archive::
Use the command::

tar xzvf italian_fts-VERSION.tar.gz
sudo make install

Install the dictionary files in the proper directories::
to install the dictionary files in the target directories. The command will
use the first ``pg_config`` found on the ``PATH`` to read the database
configuration: to install the dictionary in a different database you can use
the ``PG_CONFIG`` variable::

cd italian_fts-VERSION
make install
sudo make PG_CONFIG=/path/to/pg_config install

You can install the dictionary in a database (*mydict* in the example)
with the command:
With PostgreSQL versions older than 9.1 you can install the dictionary in a
database with the command:

.. parsed-literal::
psql -f $(pg_config --sharedir)/italian_fts.sql *mydict*
psql -f $(pg_config --sharedir)/italian_fts/italian_fts.sql *dbname*
The same directory also contains an uninstall script.

With PostgreSQL 9.1 you can use the `extensions management commands`__ to
install the dictionary::

CREATE EXTENSION italian_fts;

.. __: http://developer.postgresql.org/pgdocs/postgres/extend-extensions.html

The command updates the ``italian`` default configuration: the new configuration
will use the ISpell dictionary, falling back on the stemmer upon unrecognized
words.
2 changes: 1 addition & 1 deletion src/Makefile
Expand Up @@ -9,7 +9,7 @@ EXTVERSION = $(shell grep '"version":' META.json | head -1 | sed -e 's/\s*"versi
PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo pre91 || echo 91)

DATA_TSEARCH = italian.dict italian.affix italian.stop
DOCS = README.$(EXTENSION) LEGGIMI.$(EXTENSION)
DOCS = README.rst LEGGIMI.rst

ifeq ($(PG91),91)
INSTALLSCRIPT = $(EXTENSION)--$(EXTVERSION).sql
Expand Down

0 comments on commit 4f09a2f

Please sign in to comment.