lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [13/50] lucene-solr:jira/solr-9858: SOLR-10018: default hl.maxAnalyazedChars to 51200 across all highlighters
Date Thu, 09 Feb 2017 20:09:30 GMT
SOLR-10018: default hl.maxAnalyazedChars to 51200 across all highlighters


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

Branch: refs/heads/jira/solr-9858
Commit: f5c6c3b796ff6be59a9811f0f4f69cd6e8c0a3cd
Parents: f6e124e
Author: David Smiley <dsmiley@apache.org>
Authored: Thu Feb 2 13:51:39 2017 -0500
Committer: David Smiley <dsmiley@apache.org>
Committed: Thu Feb 2 13:51:39 2017 -0500

----------------------------------------------------------------------
 solr/CHANGES.txt                                             | 3 +++
 .../org/apache/solr/highlight/DefaultSolrHighlighter.java    | 3 +--
 .../org/apache/solr/highlight/PostingsSolrHighlighter.java   | 4 ++--
 .../src/java/org/apache/solr/highlight/SolrHighlighter.java  | 1 +
 .../org/apache/solr/highlight/UnifiedSolrHighlighter.java    | 8 ++++----
 .../java/org/apache/solr/common/params/HighlightParams.java  | 2 +-
 6 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c6c3b7/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9765a33..6b91b95 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -164,6 +164,9 @@ Other Changes
 
 * SOLR-10043: Reduce logging of pre-start log rotation (janhoy)
 
+* SOLR-10018: Increase the default hl.maxAnalyzedChars to 51200 for the Unified & Postings
Highlighter so that all
+  highlighters now have this same default. (David Smiley)
+
 ==================  6.4.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c6c3b7/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
index e035a75..33ea575 100644
--- a/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
@@ -525,8 +525,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements
PluginInf
     }
 
     int maxCharsToAnalyze = params.getFieldInt(fieldName,
-        HighlightParams.MAX_CHARS,
-        Highlighter.DEFAULT_MAX_CHARS_TO_ANALYZE);
+        HighlightParams.MAX_CHARS, DEFAULT_MAX_CHARS);
     if (maxCharsToAnalyze < 0) {//e.g. -1
       maxCharsToAnalyze = Integer.MAX_VALUE;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c6c3b7/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 513b38a..9fcf9f3 100644
--- a/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java
@@ -66,7 +66,7 @@ import org.apache.solr.util.plugin.PluginInfoInitialized;
  *       &lt;str name="hl.bs.country"&gt;&lt;/str&gt;
  *       &lt;str name="hl.bs.variant"&gt;&lt;/str&gt;
  *       &lt;str name="hl.bs.type"&gt;SENTENCE&lt;/str&gt;
- *       &lt;int name="hl.maxAnalyzedChars"&gt;10000&lt;/int&gt;
+ *       &lt;int name="hl.maxAnalyzedChars"&gt;51200&lt;/int&gt;
  *       &lt;str name="hl.multiValuedSeparatorChar"&gt; &lt;/str&gt;
  *       &lt;bool name="hl.highlightMultiTerm"&gt;false&lt;/bool&gt;
  *     &lt;/lst&gt;
@@ -204,7 +204,7 @@ public class PostingsSolrHighlighter extends SolrHighlighter implements
PluginIn
     protected final IndexSchema schema;
 
     public SolrExtendedPostingsHighlighter(SolrQueryRequest req) {
-      super(req.getParams().getInt(HighlightParams.MAX_CHARS, PostingsHighlighter.DEFAULT_MAX_LENGTH));
+      super(req.getParams().getInt(HighlightParams.MAX_CHARS, DEFAULT_MAX_CHARS));
       this.params = req.getParams();
       this.schema = req.getSchema();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c6c3b7/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
index e9ebf0c..a8ee734 100644
--- a/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
@@ -31,6 +31,7 @@ import java.util.List;
 public abstract class SolrHighlighter
 {
 
+  public static int DEFAULT_MAX_CHARS = 51200;
   public static int DEFAULT_PHRASE_LIMIT = 5000;
 
   /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c6c3b7/solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java
index 2633522..c80e522 100644
--- a/solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java
@@ -62,8 +62,8 @@ import org.apache.solr.util.plugin.PluginInfoInitialized;
  * &lt;str name="hl.tag.post"&gt;&amp;lt;/em&amp;gt;&lt;/str&gt;
  * &lt;str name="hl.simple.pre"&gt;&amp;lt;em&amp;gt;&lt;/str&gt;
  * &lt;str name="hl.simple.post"&gt;&amp;lt;/em&amp;gt;&lt;/str&gt;
- * &lt;str name="hl.tag.ellipsis"&gt;... &lt;/str&gt;
- * &lt;bool name="hl.defaultSummary"&gt;true&lt;/bool&gt;
+ * &lt;str name="hl.tag.ellipsis"&gt;(internal/unspecified)&lt;/str&gt;
+ * &lt;bool name="hl.defaultSummary"&gt;false&lt;/bool&gt;
  * &lt;str name="hl.encoder"&gt;simple&lt;/str&gt;
  * &lt;float name="hl.score.k1"&gt;1.2&lt;/float&gt;
  * &lt;float name="hl.score.b"&gt;0.75&lt;/float&gt;
@@ -72,7 +72,7 @@ import org.apache.solr.util.plugin.PluginInfoInitialized;
  * &lt;str name="hl.bs.country"&gt;&lt;/str&gt;
  * &lt;str name="hl.bs.variant"&gt;&lt;/str&gt;
  * &lt;str name="hl.bs.type"&gt;SENTENCE&lt;/str&gt;
- * &lt;int name="hl.maxAnalyzedChars"&gt;10000&lt;/int&gt;
+ * &lt;int name="hl.maxAnalyzedChars"&gt;51200&lt;/int&gt;
  * &lt;bool name="hl.highlightMultiTerm"&gt;true&lt;/bool&gt;
  * &lt;bool name="hl.usePhraseHighlighter"&gt;true&lt;/bool&gt;
  * &lt;int name="hl.cacheFieldValCharsThreshold"&gt;524288&lt;/int&gt;
@@ -234,7 +234,7 @@ public class UnifiedSolrHighlighter extends SolrHighlighter implements
PluginInf
       this.params = req.getParams();
       this.schema = req.getSchema();
       this.setMaxLength(
-          params.getInt(HighlightParams.MAX_CHARS, UnifiedHighlighter.DEFAULT_MAX_LENGTH));
+          params.getInt(HighlightParams.MAX_CHARS, DEFAULT_MAX_CHARS));
       this.setCacheFieldValCharsThreshold(
           params.getInt(HighlightParams.CACHE_FIELD_VAL_CHARS_THRESHOLD, DEFAULT_CACHE_CHARS_THRESHOLD));
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c6c3b7/solr/solrj/src/java/org/apache/solr/common/params/HighlightParams.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/HighlightParams.java b/solr/solrj/src/java/org/apache/solr/common/params/HighlightParams.java
index 997fc7e..57f6734 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/HighlightParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/HighlightParams.java
@@ -66,7 +66,7 @@ public interface HighlightParams {
 
   // formatting
   public static final String FORMATTER   = HIGHLIGHT+".formatter"; // OH
-  public static final String ENCODER     = HIGHLIGHT+".encoder"; // OH, (UH, PH limited)
+  public static final String ENCODER     = HIGHLIGHT+".encoder"; // all
   public static final String MERGE_CONTIGUOUS_FRAGMENTS = HIGHLIGHT + ".mergeContiguous";
// OH
   public static final String SIMPLE      = "simple"; // OH
   public static final String SIMPLE_PRE  = HIGHLIGHT+"."+SIMPLE+".pre"; // OH


Mime
View raw message