Web / Apache Solr Interview questions
What is highlighting in Solr search results?
Highlighting returns short snippets of matched text with the query terms wrapped in emphasis tags, typically <em>, so a UI can show users why a document matched, similar to Google's bolded search snippets.
/select?q=title:solr &hl=true &hl.fl=title,description &hl.simple.pre=<em> &hl.simple.post=</em>
hl.fl lists which fields to highlight, and the field must generally be stored (or use the newer unified highlighter which can work off term vectors). Highlighting adds some query overhead, so it's usually applied only on the fields shown in result listings, not every indexed field.
More Related questions...