lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cassandra Targett (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache Solr Reference Guide > Highlighting
Date Thu, 12 Sep 2013 22:03:00 GMT
Space: Apache Solr Reference Guide (https://cwiki.apache.org/confluence/display/solr)
Page: Highlighting (https://cwiki.apache.org/confluence/display/solr/Highlighting)

Change Comment:
---------------------------------------------------------------------
More intro for the general Highlighting section

Edited by Cassandra Targett:
---------------------------------------------------------------------
Highlighting in Solr allows fragments of documents that match the user's query to be included
with the query response. The fragments are included in a special section of the response (the
{{highlighting}} section), and the client uses the formatting clues also included to determine
how to present the snippets to users. 

Solr provides a collection of highlighting utilities which allow a great deal of control over
the fields fragments are taken from, the size of fragments, and how they are formatted. The
highlighting utilities can be called by various Request Handlers and can be used with the
[DisMax|The DisMax Query Parser], [Extended DisMax|The Extended DisMax Query Parser], or [standard|The
Standard Query Parser] query parsers.

There are three highlighting implementations available:

* *[Standard Highlighter]*: The [Standard Highlighter] is the swiss-army knife of the highlighters.
It has the most sophisticated and fine-grained query representation of the three highlighters.
For example, this highlighter is capable of providing precise matches even for advanced queryparsers
such as the {{surround}} parser. It does not require any special datastructures such as {{termVectors}},
although it will use them if they are present. If they are not, this highlighter will re-analyze
the document on-the-fly to highlight it. This highlighter is a good choice for a wide variety
of search use-cases.

* *[FastVector Highlighter]*: The [FastVector Highlighter] requires term vector options ({{termVectors}},
{{termPositions}}, and {{termOffsets}}) on the field, and is optimized with that in mind.
It tends to work better for more languages than the Standard Highlighter, because it supports
Unicode breakiterators. On the other hand, its query-representation is less advanced than
the Standard Highlighter: for example it will not work well with the {{surround}} parser.
This highlighter is a good choice for large documents and highlighting text in a variety of
languages.

* *[Postings Highlighter]*: The [Postings Highlighter] requires {{storeOffsetsWithPositions}}
to be configured on the field. This is a much more compact and efficient structure than term
vectors, but is not appropriate for huge numbers of query terms (e.g. wildcard queries). Like
the FastVector Highlighter, it supports Unicode algorithms for dividing up the document. On
the other hand, it has the most coarse query-representation: it focuses on summary quality
and ignores the structure of the query completely, ranking passages based solely on query
terms and statistics. This highlighter a good choice for classic full-text keyword search.

{scrollbar}


Stop watching space: https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=solr
Change email notification preferences: https://cwiki.apache.org/confluence/users/editmyemailsettings.action


    

Mime
View raw message