Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

dismax apparently does not even output a _highlighting_ section in the output unless there is a full-text query to highlight

Erik Hatcher1da74f66788d
diff --git a/client/ruby/solr-ruby/lib/solr/response/standard.rb b/client/ruby/solr-ruby/lib/solr/response/standard.rb
index dfcba34ae0b..78404b101a7 100644
--- a/client/ruby/solr-ruby/lib/solr/response/standard.rb
+++ b/client/ruby/solr-ruby/lib/solr/response/standard.rb
@@ -47,7 +47,7 @@ class Solr::Response::Standard < Solr::Response::Ruby
end
def highlighted(id, field)
- @data['highlighting'][id.to_s][field.to_s]
+ @data['highlighting'][id.to_s][field.to_s] rescue nil
end
# supports enumeration of hits