Search code examples
solrlucenesearch-enginenutch

Getting snippets in Solr


I'm running Solr + Nutch and need to get a snippet of each result. I tried setting hl to true in the query URL but I still get the same XML result (without snippets). Any ideas on how to get this done?


Solution

  • You need to specify the fields that you want highlight results returned for by passing field names to the hl.fl parameter in your query. Please see HighlightingParameters on the Solr Wiki for more details and examples.