RoR: acts_as_solr Highlighting

This post is pure geekery, so never you mind if that's not your thing... We use a Ruby on Rails plugin called acts_as_solr for full text search on some of our Rails apps at work. This provides an interface to a Solr search engine, which is based on Lucene technology. Lately I've been digging into some of the more advanced features Solr provides, for which I found this QuarkRuby post invaluable.

You'll notice I posted a somewhat confused comment recently. I've been trying to post a follow-up comment to share what I've discovered on the topic, but it's not letting me for some reason, so here it is for the sake of teh intarwebs:

Just to follow up: It turns out AAS doesn't (yet) support some of the hl parameters, including requireFieldMatch.

FYI, though, requireFieldMatch will only return highlights if you searched the highlight fields specifically, so q=(test)+AND+type_t:Post&hl=true \ &hl.fl=body_t,title_t&hl.requireFieldMatch=true will not work, but q=(body_t:test+OR+title_t:test)+AND+type_t:Post \ &hl=true&hl.fl=body_t,title_t&hl.requireFieldMatch=true will return the expected highlights.

In my eyes, that makes that feature kind of "meh"...

Also worth noting, I submitted a patch for rebuild_solr_index. It was ignoring the :if when batch_size was supplied.

I'm kind of excited about the patch. It's totally trivial and perhaps not even the best implementation, but it's my first contribution to an open source project. That's totally cool in the geekiest way possible!