3111: Search works only for word-characters. Does not for code or special characters

rafal.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 18, 2014
What version are you running?
1.7.16

What's the URL of the page containing the problem?
Internal Server Error: /r/search/

What steps will reproduce the problem?
1. Use ReviewBoard search to find part of the code containing some special strings or characters. For example $#line -= 1 ; {} or 409eitjugrew0[tu4
2.
3.

What is the expected output? What do you see instead?
I should see the page with search results. I see error page from web browser (server didn't send an answer) or apache itself (internal error).

What operating system are you using? What browser?
Ubuntu 13.04 as RB server and Firefox/IE8/Chromium for issue testing

Please provide any additional information below.

I use RB 1.7.16 and PyLucene 3.6.2-1 as 4.x is not supported. Review Board search works fine for normal word-characters but search for some special characters causes internal failure. Try to search 409eitjugrew0%5Btu4. Web browser will show Error 500 or "No data received". Apache will also fail and show following error log:

[Thu Oct 17 09:31:59 2013] [notice] child pid 1445 exit signal Segmentation fault (11)

RB will return following error log:

None - admin1 - /r/search/ - Internal Server Error: /r/search/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4.8-py2.7.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.16-py2.7.egg/reviewboard/accounts/decorators.py", line 20, in _check
    return login_required(view_func)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Djblets-0.7.21-py2.7.egg/djblets/auth/util.py", line 47, in _checklogin
    return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.16-py2.7.egg/reviewboard/reviews/views.py", line 1413, in search
    for hit in searcher.search(parser.parse(query), 100).scoreDocs]
JavaError: org.apache.lucene.queryParser.ParseException: Cannot parse '409eitjugrew0[tu4': Encountered "<EOF>" at line 1, column 17.
Was expecting one of:
    "TO" ...
    <RANGEIN_QUOTED> ...
    <RANGEIN_GOOP> ...

    Java stacktrace:
org.apache.lucene.queryParser.ParseException: Cannot parse '409eitjugrew0[tu4': Encountered "<EOF>" at line 1, column 17.
Was expecting one of:
    "TO" ...
    <RANGEIN_QUOTED> ...
    <RANGEIN_GOOP> ...

	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:211)
Caused by: org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 17.
Was expecting one of:
    "TO" ...
    <RANGEIN_QUOTED> ...
    <RANGEIN_GOOP> ...

	at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1849)
	at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1731)
	at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1470)
	at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1319)
	at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1275)
	at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
david
#1 david
In 2.0 beta 2, we've replaced the PyLucene search backend with Haystack and Whoosh. Now that we have a path forward, we're not going to spend time trying to fix issues with PyLucene because it's so annoying.
  • +WontFix