Apache Solr open-source search software
Add support for alternate field highlighting, based on patch by Koji Sekiguchi on SOLR-376
Erik Hatcher66b05d1da59f
diff --git a/client/ruby/solr-ruby/CHANGES.yml b/client/ruby/solr-ruby/CHANGES.ymlindex 193a7c7cc99..656a051aca7 100644--- a/client/ruby/solr-ruby/CHANGES.yml+++ b/client/ruby/solr-ruby/CHANGES.yml@@ -4,6 +4,7 @@ v0.0.6:- Added Solr::Request::Spellcheck- Enabled Solr::Requst::Select to work as a general pass through to any registered request handler- Fixed modify_document_test.rb so as to not be brittle with Hash ordering+ - Added support for alternate field highlighting to Solr::Request::Standard (and thus DisMax)v0.0.5:release_date: 2007-08-27diff --git a/client/ruby/solr-ruby/lib/solr/request/standard.rb b/client/ruby/solr-ruby/lib/solr/request/standard.rbindex cf9ee052b85..1548e151f06 100755--- a/client/ruby/solr-ruby/lib/solr/request/standard.rb+++ b/client/ruby/solr-ruby/lib/solr/request/standard.rb@@ -99,6 +99,11 @@ class Solr::Request::Standard < Solr::Request::Selecthash["hl.simple.pre"] = @params[:highlighting][:prefix]hash["hl.simple.post"] = @params[:highlighting][:suffix]hash["hl.fragsize"] = @params[:highlighting][:fragment_size]+ if @params[:highlighting][:alternate_fields]+ @params[:highlighting][:alternate_fields].each do |k,v|+ hash["f.#{k}.hl.alternateField"] = v+ end+ endendif @params[:mlt]