What version are you running?
1.7.13
What's the URL of the page containing the problem?
What steps will reproduce the problem?
1. Install PyLucene 4.x and attempt to search
2.
3.
What is the expected output? What do you see instead?
I expected to see search results. Instead I got a 500 error with the following assertion in the logs..
2013-09-20 01:40:26,480 - ERROR - None - admin - /reviewboard/r/search/ - Internal Server Error: /reviewboard/r/search/
Traceback (most recent call last):
File "/opt/reviewboard-1.7.13-0/apps/django/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/reviewboard-1.7.13-0/apps/reviewboard/lib/ReviewBoard-1.7.13-py2.7.egg/reviewboard/accounts/decorators.py", line 20, in _check
return login_required(view_func)(*args, **kwargs)
File "/opt/reviewboard-1.7.13-0/python/lib/python2.7/site-packages/Djblets-0.7.17-py2.7.egg/djblets/auth/util.py", line 47, in _checklogin
return view_func(request, *args, **kwargs)
File "/opt/reviewboard-1.7.13-0/apps/reviewboard/lib/ReviewBoard-1.7.13-py2.7.egg/reviewboard/reviews/views.py", line 1394, in search
assert False
What operating system are you using? What browser?
Windows 7, Chrome
Please provide any additional information below.
The assertion comes from the PyLucene version check, which seems to enforce using 2.x or 3.x
1377 import lucene
1378 lv = [int(x) for x in lucene.VERSION.split('.')]
1379 lucene_is_2x = lv[0] == 2 and lv[1] < 9
1380 lucene_is_3x = lv[0] == 3 or (lv[0] == 2 and lv[1] == 9)
1381
1382 # We may have already initialized lucene
1383 try:
1384 lucene.initVM(lucene.CLASSPATH)
1385 except ValueError:
1386 pass
1387
1388 index_file = siteconfig.get("search_index_file")
1389 if lucene_is_2x:
1390 store = lucene.FSDirectory.getDirectory(index_file, False)
1391 elif lucene_is_3x:
1392 store = lucene.FSDirectory.open(lucene.File(index_file))
1393 else:
1394 assert False <--- HERE
The installation docs at http://www.reviewboard.org/docs/manual/dev/admin/installation/linux/#installing-pylucene-optional explicitly say to "download the latest version of PyLucene". So I guess until 4.x is supported the docs should at least be updated. The admin UI that lets you enable search should probably check for the required version as well so the admin will know right away when they try to enable the feature.