From 7c12e5cc35cf0ff42a7807fdbeb2b99e6be5eac9 Mon Sep 17 00:00:00 2001 From: David Sauve Date: Thu, 29 Apr 2010 13:05:13 -0400 Subject: [PATCH] Updated README.rst with a better explanation of when to use SearchIndex vs. RealtimeSearchIndex --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index fd05e27..e167619 100644 --- a/README.rst +++ b/README.rst @@ -21,7 +21,8 @@ Notes ----- - Due to an issue with mod_python possibly causing deadlocks with Xapian (`issue #364 `_), when Python is not invoked through the "main interpreter", mod_python is not supported with xapian-haystack. It may work, with some tweaking, but your mileage will vary. -- Because Xapian does not support simultaneous ``WritableDatabase`` connections, it is *strongly* recommended that users take care when using ``RealTimeSearchIndex`` to either set ``WSGIDaemonProcess processes=1`` or use some other way of ensuring that there are not multiple attempts to write to the indexes. Alternatively, use ``SearchIndex`` and a cronjob to reindex content at set time intervals (sample cronjob can be found `here `_) or derive your own ``SearchIndex`` to implement some other form of keeping your indexes up to date. + +- Because Xapian does not support simultaneous ``WritableDatabase`` connections, it is *strongly* recommended that users take care when using ``RealTimeSearchIndex``. If there is a possibility of simultaneous write attempts on the database, keep in mind that they are likely to trigger multiple reindex attempts on the search index. If this occurs an `DatabaseLockError` exception will be raised by Xapian. To avoid this, either set ``WSGIDaemonProcess processes=1`` or use some other way of ensuring that there are not multiple attempts to write to the indexes. Alternatively, use ``SearchIndex`` and a cronjob to reindex content at set time intervals (sample cronjob can be found `here `_) or derive your own ``SearchIndex`` to implement some other form of keeping your indexes up to date. A good alternative is to use a `QueuedSearchIndex `_. Installation ------------