You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2017/05/23 21:34:47 UTC

lucene-solr:branch_6x: SOLR-10700: Mark PostingsSolrHighlighter as deprecated (code and ref guide) partially cherry picked from 2218ded

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 2d054965a -> f246717ab


SOLR-10700: Mark PostingsSolrHighlighter as deprecated (code and ref guide)
partially cherry picked from 2218ded


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f246717a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f246717a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f246717a

Branch: refs/heads/branch_6x
Commit: f246717ab36611dbb10097cd8b013118c70664b4
Parents: 2d05496
Author: David Smiley <ds...@apache.org>
Authored: Tue May 23 17:34:41 2017 -0400
Committer: David Smiley <ds...@apache.org>
Committed: Tue May 23 17:34:41 2017 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  2 ++
 .../solr/highlight/PostingsSolrHighlighter.java |  5 +--
 solr/solr-ref-guide/src/highlighting.adoc       | 32 +++++---------------
 3 files changed, 12 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f246717a/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 8bf1784..d927fef 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -365,6 +365,8 @@ Other Changes
   Instead, switch to LatLonPointSpatialField or SpatialRecursivePrefixTreeFieldType or RptWithGeometrySpatialField.
   (David Smiley)
 
+* SOLR-10700: Deprecated PostingsSolrHighlighter. Use UnifiedSolrHighlighter instead. (David Smiley)
+
 ==================  6.5.1 ==================
 
 Bug Fixes

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f246717a/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java
index 5ea3db1..5c2a2cb 100644
--- a/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java
@@ -98,9 +98,10 @@ import org.apache.solr.util.plugin.PluginInfoInitialized;
  *    <li>hl.highlightMultiTerm enables highlighting for range/wildcard/fuzzy/prefix queries.
  *        NOTE: currently hl.maxAnalyzedChars cannot yet be specified per-field
  *  </ul>
- *  
- * @lucene.experimental 
+ *
+ * @deprecated Use {@link UnifiedSolrHighlighter} instead
  */
+@Deprecated
 public class PostingsSolrHighlighter extends SolrHighlighter implements PluginInfoInitialized {
   
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f246717a/solr/solr-ref-guide/src/highlighting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/highlighting.adoc b/solr/solr-ref-guide/src/highlighting.adoc
index 5a55fd2..7207ce9 100644
--- a/solr/solr-ref-guide/src/highlighting.adoc
+++ b/solr/solr-ref-guide/src/highlighting.adoc
@@ -137,11 +137,14 @@ This highlighter's query-representation is less advanced than the Original or Un
 +
 Note that both the FastVector and Original Highlighters can be used in conjunction in a search request to highlight some fields with one and some the other. In contrast, the other highlighters can only be chosen exclusively.
 
-<<Highlighting-ThePostingsHighlighter,Postings Highlighter>>:: (`hl.method=postings`)
+The Postings Highlighter:: (`hl.method=postings`)
 +
-The Postings Highlighter is the ancestor of the Unified Highlighter, supporting a subset of its options and none of its index configuration flexibility - it _requires_ `storeOffsetsWithPositions` on all fields to highlight. This option is here for backwards compatibility; if you find you need it, please share your experience with the Solr community.
+The Postings Highlighter is the ancestor of the Unified Highlighter, supporting a subset of its options and none of its index configuration flexibility - it _requires_ `storeOffsetsWithPositions` on all fields to highlight.
+This option is here for backwards compatibility; it's deprecated.
+In 7.0, it is internally implemented as a reconfiguration of the Unified Highlighter.
+See older reference guide editions for its options.
 
-The Unified Highlighter and Postings Highlighter from which it derives, are exclusively configured via search parameters. In contrast, some settings for the Original and FastVector Highlighters are set in `solrconfig.xml`. There's a robust example of the latter in the "```techproducts```" configset.
+The Unified Highlighter is exclusively configured via search parameters. In contrast, some settings for the Original and FastVector Highlighters are set in `solrconfig.xml`. There's a robust example of the latter in the "```techproducts```" configset.
 
 In addition to further information below, more information can be found in the {solr-javadocs}/solr-core/org/apache/solr/highlight/package-summary.html[Solr javadocs].
 
@@ -157,7 +160,7 @@ The benefit of this approach is that your index won't grow larger with any extra
 The down side is that highlighting speed is roughly linear with the amount of text to process, with a large factor being the complexity of your analysis chain.
 +
 For "short" text, this is a good choice. Or maybe it's not short but you're prioritizing a smaller index and indexing speed over highlighting performance.
-* *Postings*: Supported by the Unified and Postings Highlighters. Set `storeOffsetsWithPositions` to `true`. This adds a moderate amount of extra data to the index but it speeds up highlighting tremendously, especially compared to analysis with longer text fields.
+* *Postings*: Supported by the Unified Highlighter. Set `storeOffsetsWithPositions` to `true`. This adds a moderate amount of extra data to the index but it speeds up highlighting tremendously, especially compared to analysis with longer text fields.
 +
 However, wildcard queries will fall back to analysis unless "light" term vectors are added.
 
@@ -193,27 +196,6 @@ The Unified Highlighter supports these following additional parameters to the on
 |hl.bs.separator |_(blank)_ |Indicates which character to break the text on. Requires `hl.bs.type=SEPARATOR`. This is useful when the text has already been manipulated in advance to have a special delineation character at desired highlight passage boundaries. This character will still appear in the text as the last character of a passage.
 |===
 
-[[Highlighting-ThePostingsHighlighter]]
-=== The Postings Highlighter
-
-The Postings Highlighter is the ancestor of the Unified Highlighter, supporting a subset of it's options and sometimes with different default settings for some common parameters.
-
-Viewed from the perspective of the Unified Highlighter, these settings are effectively non-settings and fixed as-such:
-
-* `hl.offsetSource=POSTINGS`
-* `hl.requireFieldMatch=true`
-* `hl.usePhraseHighlighter=false`
-* `hl.fragsize=-1` (none).
-
-It has these different default settings:
-
-* `hl.defaultSummary=true`
-* `hl.tag.ellipsis="... "`.
-
-In addition, it has a setting `hl.multiValuedSeparatorChar=" "` (space).
-
-This highlighter never returns separate snippets as separate values; they are always joined by `hl.tag.ellipsis`.
-
 [[Highlighting-TheOriginalHighlighter]]
 == The Original Highlighter