I'm afraid your solution only works when using the development server,
and even then when used in auto_reload mode.
I think the easiest solution is to simply execute the functions
interfacing with pylucene in their own thread. something like:
def search(query):
- delegate work to new pylucene thr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Solution found in pylucene-dev :
changed django/utils/autoreload.py
from:
import thread
to:
import PyLucene.PythonThread as thread
Norjee a écrit :
> Pylucene has some threading issues (read incompatibilities with python
> threads, it must be run
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thx :)
Norjee a écrit :
> Pylucene has some threading issues (read incompatibilities with python
> threads, it must be run from either the main thread, or its own thread
> version).
>
> The solution is rather simple, use it in its own separte thread
Pylucene has some threading issues (read incompatibilities with python
threads, it must be run from either the main thread, or its own thread
version).
The solution is rather simple, use it in its own separte thread. See
for example turbolucene, http://dev.krys.ca/turbolucene/
--~--~-~-
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
My probleme with search-api and lucene :
I make index and search with a script python test.py.
python manage.py shell < test.py
It's ok, and give me results.
But when I use this.
python manage.py runserver 8080 --verbosity=2
and add the first l