New improvements: Full-text search of Notebook content powered by Whoosh

4 views
Skip to first unread message

Alex Clemesha

unread,
Aug 29, 2009, 7:24:01 PM8/29/09
to codenod...@googlegroups.com
Hi,

I just pushed the latest improvements up to codenode master
(http://github.com/codenode/codenode)
and the main new addition is Full-text search of Notebook content,
powered by Whoosh.

The best way to try out the new features is to do the following:
$ virtualenv --no-site-packages codenode_env
$ pip -E codenode_env install -e
git://github.com/codenode/codenode.git#egg=codenode


Here is a little more about the new features. From the Whoosh
homepage (whoosh.ca):
"Whoosh is a fast, featureful full-text indexing and searching library
implemented in pure Python. "
and my experience with Whoosh has been great, as it was easy to "plug
in" to codenode
and has lots of great features.

The coolest detail about how Whoosh was integrated with codenode is
the way all Notebook content (every Cell ever created for a given Notebook)
is indexed. We use Django's excellent signal framework [1] to attach
a "post_save" signal to every save of each Cell.

In the file "codenode/frontend/search/search.py" we have the following line:
"signals.post_save.connect(update_index, sender=models.Cell)"
which updates the search index with the Cell content, and is extremely
fast because each Cells content is, in general, small.

We also use Django's signal framework to do the Revision History
functionality, that was adding in a couple weeks ago, see here for
details and screenshots of that:
http://groups.google.com/group/codenode-devel/browse_thread/thread/807379329ddf3849

Lastly, the new search functionality is fully unit-tested. Thanks to the
effort by James Casbon, who helped getting Nose testing started, we are finding
it very easy to do more "test driven development" with Nose.


-Alex


[1] http://docs.djangoproject.com/en/dev/topics/signals/


--
Alex Clemesha
clemesha.org

Reply all
Reply to author
Forward
0 new messages