Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Search

Search

This document describes on how to set up search for SCT.

1. General

The search applications are decoupled from the actual wiki, forum,.. applications to not depend on any search engine. These applications are located in sphene.sphsearch* - for example sphene.sphsearchboard. (The Board/Forum is currenty the only application supporting search.)

SCT makes use of a modified version of djapian.

Currently only the Forum supports search.

2. Requirements

2.1. Xapian

Please follow the documentation on how to set up xapian:

2.2. Djapian

Download the latest version of djapian from http://code.google.com/p/djapian/ (known revision to work: 106)

svn checkout http://djapian.googlecode.com/svn/trunk/ djapian-read-only

afterwards read the djapian documentation on how to install it - you will need to make sure it is in your PYTHON_PATH.

Now add djapian to your INSTALLED_APPS and run ./manage.py syncdb - this should create the Change model from djapian.

Daemon: for indexing to work correctly you have to setup the daemon - see http://code.google.com/p/djapian/wiki/Architecture

3. Activate search

Since as of writing only the forum has a search application called sphsearchboard i explain it with it.

3.1. Installed Apps

Add the application 'sphene.sphsearchboard' to your INSTALLED_APPS (in settings_local.py).

3.2. URL Configuration

Add a URL to your url patterns (e.g. in communitydraft this would be communitydraft/community/urlconfs/community_urls.py):

(r'^board/search/', include('sphene.sphsearchboard.urls'), community_urls.defaultdict),

3.3. Initial update

after activating search you need to update the whole index once to find anything. (all changes to models afterwards should be catched by the daemon and updated automatically.)

herbert-pouls-computer:~/dev/python/sphenecommunity/sphenecommunity herbert$ python2.5 ./manage.py shell
Executing module body.

>>> from sphene.sphsearchboard import models
>>> models.post_index.update()
>>>

4. Deployment

mod_python (3.3.1) has a problem which prevents the xapian bindings from working correcty. So you can not use the search with mod_python !

I am currently using mod_wsgi - Here you have to make sure to use the following apache directive:

WSGIApplicationGroup %{GLOBAL}

Tags:

Last Modified: 2008-10-30 02:17:22 by Herbert Poul - [ Snip Changes ] [ Wiki History ]

1 Comments

Customize List
2221
4
2010-08-04 19:13:58
Anonymous
1 Threads

Please login to create a new thread.



Powered by Sphene Community Tools