Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A plugin for Trac that provides an extension point for attaching a full text search engine. Including a backend for Solr.
Python JavaScript
branch: master

This branch is 66 commits behind dnephin:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
plugin-src
solr/conf
.gitignore
LICENSE
README

README

Trac Advanced Search Plugin
---------------------------
README

An advanced search plugin for the open source Trac project 
(http://trac.edgewall.org/). This Trac plugin allows you to use a full-text 
search engine (such as Apache Solr) as the search backend for performing 
search in Trac.  This plugin also includes a backend for Apache Solr
(http://lucene.apache.org/solr/), but other plugins can use the extension point
provided this plugin to use a different backend.

See the interface in plugin-src/advsearch/interface.py for details about which
methods to implement.

See http://trac.edgewall.org/wiki/TracDev for more information about developing
a Trac plugin.


__ How it works __

Once your existing tickets/wiki documents are indexed in the backend you can 
make requests using the 'Advanced Search' form.  These searches will be handled
by the search backend you have confired in trac.ini.  When new documents or
tickets are added the upsert_document will be called on each search backend 
to update the index immediately. 



__ Project Status __
Still under development.



__ Requirements __

The following python packages are required for the solr backend.

pysolr (https://github.com/toastdriven/pysolr)



__ Installation __

This assumes you already have a Trac environment setup.

1. Build and install the plugin
cd plugin-src 
python setup.py bdist_egg
cp ./dist/TracAdvancedSearch-0.2-py2.5.egg <trac_environment_home>/plugins

2. Setup the search backend.  If you're using solr, copy and modify the 
configuration files provided.
cp ./solr/conf/* <solr_home>/conf

3. Index your current tickets and wiki pages in the search backend.  If you're
using solr, see ./solr/conf/data-config.xml

4. Configure your trac.ini (see the Configuration section below).

5. Restart the trac server. This will differ based on how you are running trac 
(apache, tracd, etc).

That's it. You should see an Advanced Search button in the main navbar.



__ Configuration __

In trac.ini you'll need to configure whichever search backend you're using.  If
you're using the default pysolr backend, add something like this:

[pysolr_search_backend]
solr_url = http://localhost:8983/solr/
timeout = 30 

[advanced_search_plugin]
menu_label = Real Search

button_label and timeout are both optional.


__ Remove Search button __

To disable the old search add the following to <project_env>/conf/trac.ini.
Your trac.ini may already have a components section.

[components]                                                                                                                   
trac.search.web_ui.SearchModule = disabled  



__ TODO __

- Filters for ticket only properties
- improved summary
Something went wrong with that request. Please try again.