Version 18, last updated by Vitalie Danu at June 14, 2011 23:54 UTC
Setup Xapian indexer
Assembla uses a text indexing and search system to find spaces, tickets, wiki pages, messages, and other objects. This is invoked in the top search box for the system level pages, which search many spaces, and in the top search box inside a space, and in the tickets/search page.
Assembla can use different text indexing and search systems. The default development system uses MySQL FULLTEXT indexes. The production system uses Xapian, which is faster and more scalable, but unfortunately does not have binary installs for Windows.
The model objects that are indexed have an acts_as_searchable declaration. This triggers indexing on save.
This page contains instructions for running the Xapian indexing and search server.
Install Xapian bindings
Debian or Ubuntu: Install the package libxapian-ruby1.8 rabbitmq-server:
apt-get install libxapian-ruby1.8 rabbitmq-server
Download xapian bindings, extract archive, enter that dir then compile and install them with this command (your paths might be different):
./configure --with-ruby RUBY_LIB=/usr/lib/ruby/1.8/ RUBY_LIB_ARCH=/usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/ && make && sudo make install
- Other Linux: Download and unpack xapian-bindings. Configure, build, and install instructions are located in the INSTALL file. (On openSUSE, the zypper package xapian-core-devel was also needed to build xapian-bindings).
-
Mac OS X Snow Leopard:
brew install xapian --ruby
brew install rabbitmq
- Windows:
1. Install Microsoft Visual C++ 2005 Redistributable Package
2. Download the Ruby binding
3. Copy the three files in the Ruby path (the path can be seen with the special Ruby varable $:)
4. Test that the Xapian gem works properly: ruby -e "require 'xapian'"
Configure
- In config/settings_local.yml under "search:" change "service: simple" to "service: xapian". If you do not have this file, copy settings.yml to settings_local.yml and edit settings_local.yml
- Run
rebuild_index=1 ./script/xapianto index all objects from the db, but first make sure you started xapian_indexer script:./script/jobs/production/queues_consumers/xapian_indexer.rb
Run
- To run the Search Service use:
ruby script/xapian
(script/xapian will run by default in readonly mode, and can take 2 options:
-p <port> - change the default port which xapian server will listen on
-h - Get help on options) - To update the index
Runrebuild_index=1 ./script/xapian, but first make sure you started xapian_indexer script:./script/jobs/production/queues_consumers/xapian_indexer.rb