From 738b9a77916cbdb2e4b98d5520a32ead45164c33 Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Tue, 1 Jun 2010 10:22:58 -0500
Subject: [PATCH] task #651892: Improve documentation.

- Avoid reference to the no more used perl bindings(see #318087 for
  details).
- Better README file using asciidoc an updating it.
---
 README.txt    |  136 +++++++++++++++++++++++++++++++-------------------------
 xapian.module |    7 +++
 2 files changed, 82 insertions(+), 61 deletions(-)

diff --git README.txt README.txt
index 76fc866..a1bf1a2 100644
--- README.txt
+++ README.txt
@@ -1,101 +1,115 @@
-Setting up the Xapian module
-============================
-In order to use the Xapian module, the following packages are necessary
+// $Id$
+= Xapian integration =
 
-Required
---------
-. Xapian
-. Xapian's PHP5 bindings (on the web server)
+== Overview ==
 
-Optional (Perl extras need this)
---------------------------------
-. Xapian's Perl bindings (Search::Xapian)
+This module will let you make votes on some entities inside drupal with
+different widgets, by using Voting API and its some submodules: vud_node,
+vud_comment and vud_term.
 
+AJAX functionality, provided by ctools, is used for voting if the browser
+supports it.
 
-Installation of the Xapian requirements
-=======================================
-Debian/Ubuntu
--------------
-apt-get install php5-xapian libsearch-xapian-perl libxapian15
+=== Features ===
+
+* Let you index and search drupal content.
+
+To submit bug reports and feature suggestions, or to track changes:
+  http://drupal.org/project/issues/xapian
+
+== Requirements ==
+
+* External packages:
+** Xapian
+** Xapian's PHP5 bindings (on the web server)
+* Drupal modules:
+** search
+
+== Installation of the Xapian requirements ==
+
+The next documentation will summarize wht you need to do to install
+Xapian.
+
+=== Debian/Ubuntu ===
+
+aptitude install php5-xapian
 
 Note: With ubuntu hardy, the library was not put in the built in include
 path. Running this command resolved that
 
 sudo ln -s /usr/share/php5/xapian.php /usr/share/php/xapian.php
 
-Redhat
-------
-yum install xapian-core-libs xapian-core perl-Search-Xapian
+=== Redhat/CentOS/Fedora ===
 
-Any other requirements should be satisfiable from the xapian project pages:
-http://www.xapian.org/docs/install.html
-http://www.xapian.org/download.php
+yum install xapian-core-libs xapian-core
 
-At worst, you may have to build it from source, but that is not hard to do.
+=== By hand ===
 
+At worst, you may have to build it from source, but that is not hard to
+do.
+The official documentation is on:
 
-Module installation
-===================
-Follow the standard drupal installation procedure and copy the module 
-files to sites/xxx/modules/xapian
+* http://www.xapian.org/docs/install.html
+* http://www.xapian.org/download.php
 
-You should then be able to enable the xapian module in the admin interface
-admin/build/modules
+== Instalation ==
 
-Note: The standard drupal search module still needs to be enabled as well,
-as the Xapian module only provides a back end, not the front end forms etc.
+* Install xapian and its bidings(see Installation of the Xapian
+requirements)
+* Install as usual, see http://drupal.org/node/70151 for further
+information.
 
-Next, navigate to the settings page, admin/settings/xapian.
+== Configuration ==
 
-Settings
-========
-Database
---------
-In the settings page, choose whether to use a local or remote database.
+Customize the  settings in Administer >> Site configuration >>
+Search settings >> Xapian search settings
+
+Database::
+Choose whether to use a local or remote database.
 For the local database, the "local database options" fields must be
 populated, specifically the path to the search database.
-
++
 By default, the database will be created in the drupal files area, 
 ensuring that the web server user has access to update the database.
-
++
 For the remote database, the "remote database options" fields must be 
 populated, and hostname and port being needed. See "Advanced Xapian usage"
 for more information.
 
-Display
--------
-Enter the number of search results to appear per page.
+Performance::
+If you have the "Index immediately", then the xapian module will process
+changed/updated nodes when when those actions are performed, in the other
+case it will be at cron time.
 
+Display::
 The result count field is used to determine how Xapian returns the
 total number of results. Xapian does not return an exact number, it
 estimates the results. This setting modifies that behaviour.
 
-Performance
------------
-If you have the "Queue reindexing of changed nodes" enabled, then the 
-xapian module will process changed/updated nodes when cron is run.
-
-Enabling this will also enable the "Add all nodes to queue" button.
-This button will add all nodes to the xapian module reindex queue.
-
-Diagnostics
------------
+Logging::
 It is also possible to enable query logging, which records both the search 
 query and the time required to execute it. Once you have patched drupal
 core, the reponse times for the drupal equivalent query are also logged,
 making a convenient way to test the difference the Xapian module and the
 standard drupal search.
 
+Excluded node types::
+Decide the node types you want to avoid indexing.
+
+Algorithms::
+Change the steaming language you want to use.
+
+== Advanced Xapian usage ==
+
+Xapian has the built in ability to host the database on a seperate
+machine than the web server. It you'd like to do this, the remote host
+must have xapian installed and then they must run
+`xapian-tcpsrv --port <port> <path/to/database>`, which will start a
+server that can be accessed by the Xapian library. The Drupal module
+defaults to port 6431, but any port can be used.
 
-Perl extras (Now Removed)
-=========================
+== Credits ==
 
-Advanced Xapian usage
-=====================
-Xapian has the built in ability to host the database on a seperate machine
-than the web server. It you'd like to do this, the remote host must have 
-xapian installed and then they must run "xapian-tcpsrv --port <port>
-<path/to/database>", which will start a server that can be accessed by the
-Xapian library. The Drupal module defaults to port 6431, but any port can
-be used.
+Original Author - singularo
 
+Current Maintainers: Jeremy and marvil07
diff --git xapian.module xapian.module
index 7dfa1f9..916d0a9 100644
--- xapian.module
+++ xapian.module
@@ -925,3 +925,10 @@ function _xapian_languages() {
   }
   return $languages;
 }
+
+/**
+ * Implementation of hook_help().
+ */
+function xapian_help() {
+  return t('This module allows you to index and search the content of your site. See README.txt file for more documentation.');
+}
-- 
1.7.1

