Changeset - 93cffcb6fd54
[Not reviewed]
beta
0 2 0
Jared Bunting - 14 years ago 2011-07-02 00:46:01
jared.bunting@peachjean.com
Adding documentation for indexer's self-resolving repos location.
2 files changed with 12 insertions and 11 deletions:
0 comments (0 inline, 0 general)
docs/setup.rst
Show inline comments
 
@@ -100,40 +100,41 @@ permissions against that.
 
    
 
Setting up Whoosh full text search
 
----------------------------------
 

	
 
Starting from version 1.1 the whoosh index can be build by using the paster
 
command ``make-index``. To use ``make-index`` you must specify the configuration
 
file that stores the location of the index, and the location of the repositories
 
(`--repo-location`).Starting from version 1.2 it is 
 
also possible to specify a comma separated list of repositories (`--index-only`)
 
to build index only on chooses repositories skipping any other found in repos
 
location
 
file that stores the location of the index. You may specify the location of the 
 
repositories (`--repo-location`).  If not specified, this value is retrieved 
 
from the RhodeCode database.  This was required prior to 1.2.  Starting from 
 
version 1.2 it is also possible to specify a comma separated list of 
 
repositories (`--index-only`) to build index only on chooses repositories 
 
skipping any other found in repos location
 

	
 
You may optionally pass the option `-f` to enable a full index rebuild. Without
 
the `-f` option, indexing will run always in "incremental" mode.
 

	
 
For an incremental index build use::
 

	
 
	paster make-index production.ini --repo-location=<location for repos> 
 
	paster make-index production.ini 
 

	
 
For a full index rebuild use::
 

	
 
	paster make-index production.ini -f --repo-location=<location for repos>
 
	paster make-index production.ini -f 
 

	
 

	
 
building index just for chosen repositories is possible with such command::
 
 
 
 paster make-index production.ini --repo-location=<location for repos> --index-only=vcs,rhodecode
 
 paster make-index production.ini --index-only=vcs,rhodecode
 

	
 

	
 
In order to do periodical index builds and keep your index always up to date.
 
It's recommended to do a crontab entry for incremental indexing. 
 
An example entry might look like this::
 
 
 
    /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos> 
 
    /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini 
 
  
 
When using incremental mode (the default) whoosh will check the last
 
modification date of each file and add it to be reindexed if a newer file is
 
available. The indexing daemon checks for any removed files and removes them
 
from index.
 

	
 
@@ -553,7 +554,7 @@ For further questions search the `Issues
 
.. _celery: http://celeryproject.org/
 
.. _rabbitmq: http://www.rabbitmq.com/
 
.. _python-ldap: http://www.python-ldap.org/
 
.. _mercurial-server: http://www.lshift.net/mercurial-server.html
 
.. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
 
.. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
 
.. _google group rhodecode: http://groups.google.com/group/rhodecode
 
\ No newline at end of file
 
.. _google group rhodecode: http://groups.google.com/group/rhodecode
rhodecode/lib/indexers/__init__.py
Show inline comments
 
@@ -110,13 +110,13 @@ class MakeIndex(BasePasterCommand):
 
            sys.exit(1)
 

	
 
    def update_parser(self):
 
        self.parser.add_option('--repo-location',
 
                          action='store',
 
                          dest='repo_location',
 
                          help="Specifies repositories location to index REQUIRED",
 
                          help="Specifies repositories location to index OPTIONAL",
 
                          )
 
        self.parser.add_option('--index-only',
 
                          action='store',
 
                          dest='repo_list',
 
                          help="Specifies a comma separated list of repositores "
 
                                "to build index on OPTIONAL",
0 comments (0 inline, 0 general)