lucene-ruby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Can't render html entities when adding documents
Date Sun, 24 Jun 2007 15:02:09 GMT
Firstly: REXML Sucks!

good grief: < 
=> "&nbsp;"

I've added this currently failing test to server_test.rb:

   def test_entities
     @connection.add(:id => 1, :title_text => "&nbsp;")
     response = @connection.query('nbsp')
     assert_equal 1, response.total_hits
     assert_equal '1', response.hits[0]['id']

This works fine with libxml, but fails with REXML because of REXML's  
ridiculous escape-everything-not-already-escaped policy.  At the  
moment I'm not sure how to resolve this, and I'm not currently sure  
how acts_as_solr worked with REXML any differently.  Thiago - can you  
shed any light on that?

My vote is to get rid of REXML support in solr-ruby and either  
require libxml-ruby to be installed or find some other lighter weight  



On Jun 19, 2007, at 9:55 PM, Thiago Jackiw wrote:

> There's something funky with solr-ruby's xml processing when adding
> documents, but I don't really know what it is yet. It can't process
> html entities at all, not even an html blank space "&nbsp;":
> SEVERE: org.xmlpull.v1.XmlPullParserException: could not resolve
> entity named 'nbsp' (position: START_TAG seen ... to participate and
> contribute to the Open Source Community.&nbsp;... @1:1085)
> Please look into it as soon as possible, acts_as_solr is using
> solr-ruby as the backend it cannot have a buggy behavior.
> Thanks.
> --
> Thiago Jackiw
> acts_as_solr =>

View raw message