ReposSearch setup

« Return to homepage

This document explains how to set up the components required for fulltext searching in a Subversion repository: indexing server, post-commit hook and search gui.

System requirements

Repos Search runs on Windows but the scripts examples below are for a typical Linux shell.

Getting started with Repos Search beta

The Repos Search download contains a sample server that can be started out of the box. Instead of downloading you may check out https://labs.repos.se/data/search/trunk/.

  1. In the unzipped/checked out Repos Search folder, go to jettysolr/
  2. Run run.sh.
  3. Go to http://localhost:8080/ to see the sample UI. There are no indexed documents yet, so you won't get any search hits.
  4. Run indexing for a repository, see hook script
  5. The sample UI should now give you search hits, with result presentation that shows all stored fields from Solr, as feedback for schema customization.
  6. Add the search box to your existing pages

Return to configuration guide

Calling the hook that does the indexing

The script repos-search/svnhook.py should be called from the post-commit hook in your Subversion repository/ies. Example:

This example is for bash shell. 2>&1 is to get all output to the same log. & is to lte post-commit exit immediately (indexing might be slow).

To rebuild the index from revision 0 to HEAD use the rebuild_index.py script,

Call the python scripts with --help to see the options.

Return to configuration guide

Adding the search GUI to existing pages

Place the repos-search/ folder in your document root. Then add the following to your HTML's <head>:

In Repos Style 2.3 simply uncomment the Repos Search block in repos.xsl.

Return to configuration guide

Customizing the search index

Most production setups of Repos Search will be customized. For example local rules for indexed svn properties can be set up in the Solr schema, found in solrhome/svnhead/conf/schema.xml. Following a Solr principle, the schema should be self-explanatory and is not documented here.

Return to configuration guide

Security

There is no access control in Repos Search, so all users that are allowed to search will get resuts from the entire repository. However Solr never returns the contents of documents, only the path.

The sample search server has no access restrictions. It runs on a custom port (8080 by default) that is normally open for local access only, so it is sufficient to protect the proxy in /repos-search/.

Kown issues

Community

Please use the Repos Style mailing list.

License

Repos Search is Apache License, Version 2.0.

 

« Return to homepage