Marcus Crafter
2006-Jul-17 11:51 UTC
[Ferret-talk] Draft port of lucene highlighter to ferret
Hi All, Hope all is going well. After being knocked out with the flu for a week I''ve been able to make some progress with porting the lucene highlighter to ferret. I''ve got a draft version available for perusal at: http://crafterm.net/ruby/highlighter/highlighter-ruby-0.1.tar.gz The port is pretty much a complete copy of the Java version at: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/highlighter/ The highlighter_test.rb file includes a few of the test cases from the original lucene test case. 3 of the 7 test cases in that file are working which shows that basic simple and fuzzy highlighting is working fine. The remaining 4 failing test cases are: test_get_wild_card_fragments test_get_mid_wild_card_fragments - Both of these have problems rewriting a wild card query into a simplified boolean query test_get_range_fragments - emits a query parse exception test_get_best_fragments_span - emits a not implemented exception If you run ''rake'' you''ll see the wild card error first, the rest have been commented out. If anyone would like to take a look into these failing test cases that would be great. Will keep debugging here and keep you all updated, but just wanted to get the code out there in case anyone wants to join in. Cheers, Marcus -- Posted via http://www.ruby-forum.com/.