lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (Created) (JIRA) <>
Subject [jira] [Created] (SOLR-3114) Highlighter: Option for target number of characters output
Date Thu, 09 Feb 2012 00:36:57 GMT
Highlighter: Option for target number of characters output

                 Key: SOLR-3114
             Project: Solr
          Issue Type: Improvement
          Components: highlighter
            Reporter: Jan Høydahl

Often you want the dynamic teaser to be about the same visual size for each article in the
result list. Google's web search for instance will display 2 lines of teaser, whether there
are one or three snippets.

In Solr you can control {{hl.snippets}} and {{hl.fragSize}}, but not the resulting total size.
If you have three snippets matching, the teaser will be three times as big as for documents
with one snippet matching.

I propose a parameter {{hl.targetSize}} as an alternative to {{hl.fragsize}}, which controls
the total number of characters to output in the teaser. So instead of saying {{&hl.snippets=3&hl.fragSize=100}}
giving teasers sized between 100-300 characters, you would say {{&hl.snippets=3&hl.targetSize=300}}
effectively resulting in the same output as long as there are three snippets, but if there
is only one, its fragSize would be adjusted to 300.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message