Comment #3 on issue 2544 by alexander.heinl...@web.de: HTTP 500 when performing search
http://code.google.com/p/reviewboard/issues/detail?id=2544

I fixed it by applying the following changes:

--- views_broken.py    2013-01-30 13:33:34.129933013 +0100
+++ views_fixed.py     2013-01-30 13:58:57.755434114 +0100
@@ -1421,8 +1421,8 @@

     if lucene_is_2x:
         parser = lucene.QueryParser('text', lucene.StandardAnalyzer())
-        result_ids = [int(lucene.Hit.cast_(hit).getDocument().get('id')) \
-                      for hit in searcher.search(parser.parse(query))]
+        hits = searcher.search(parser.parse(query))
+ result_ids = [int(hits.doc(n).get('id')) for n in range(hits.length())]
     elif lucene_is_3x:
         parser = lucene.QueryParser(lucene.Version.LUCENE_CURRENT, 'text',
             lucene.StandardAnalyzer(lucene.Version.LUCENE_CURRENT))

Please verify whether this is correct for all lucene 2.x versions and still does what it should have done before :).

Regards
Alex

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to