You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2007/12/13 05:34:01 UTC
svn commit: r603817 - in /lucene/solr/trunk/client/ruby/solr-ruby:
CHANGES.yml lib/solr/request/standard.rb
Author: ehatcher
Date: Wed Dec 12 20:34:01 2007
New Revision: 603817
URL: http://svn.apache.org/viewvc?rev=603817&view=rev
Log:
Add support for alternate field highlighting, based on patch by Koji Sekiguchi on SOLR-376
Modified:
lucene/solr/trunk/client/ruby/solr-ruby/CHANGES.yml
lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/request/standard.rb
Modified: lucene/solr/trunk/client/ruby/solr-ruby/CHANGES.yml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/CHANGES.yml?rev=603817&r1=603816&r2=603817&view=diff
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/CHANGES.yml (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/CHANGES.yml Wed Dec 12 20:34:01 2007
@@ -4,6 +4,7 @@
- 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-27
Modified: lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/request/standard.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/request/standard.rb?rev=603817&r1=603816&r2=603817&view=diff
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/request/standard.rb (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/request/standard.rb Wed Dec 12 20:34:01 2007
@@ -99,6 +99,11 @@
hash["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
+ end
end
if @params[:mlt]