lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r821555 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java src/java/org/apache/solr/util/HighlightingUtils.java
Date Sun, 04 Oct 2009 16:24:39 GMT
Author: markrmiller
Date: Sun Oct  4 16:24:39 2009
New Revision: 821555

URL: http://svn.apache.org/viewvc?rev=821555&view=rev
Log:
SOLR-1319: Upgrade Solr Highlighter classes to new Lucene Highlighter API

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
    lucene/solr/trunk/src/java/org/apache/solr/util/HighlightingUtils.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=821555&r1=821554&r2=821555&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Sun Oct  4 16:24:39 2009
@@ -731,6 +731,11 @@
 48. SOLR-1423: Due to LUCENE-1906, Solr's tokenizer should use Tokenizer.correctOffset()
instead of CharStream.correctOffset().
     (Uwe Schindler via koji)
 
+49. SOLR-1319, SOLR-1345: Upgrade Solr Highlighter classes to new Lucene Highlighter API.
This upgrade has 
+    resulted in a back compat break in the DefaultSolrHighlighter class - getQueryScorer
is no longer 
+    protected. If you happened to be overriding that method in custom code, overide getHighlighter
instead. 
+    Also, HighlightingUtils#getQueryScorer has been removed as it was deprecated and backcompat
has been 
+    broken with it anyway.  (Mark Miller)
 
 Build
 ----------------------

Modified: lucene/solr/trunk/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java?rev=821555&r1=821554&r2=821555&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java Sun Oct
 4 16:24:39 2009
@@ -165,7 +165,7 @@
    * @param fieldName The name of the field
    * @param request The SolrQueryRequest
    */
-  protected QueryTermScorer getQueryScorer(Query query, String fieldName, SolrQueryRequest
request) {
+  private Scorer getQueryScorer(Query query, String fieldName, SolrQueryRequest request)
{
      boolean reqFieldMatch = request.getParams().getFieldBool(fieldName, HighlightParams.FIELD_MATCH,
false);
      if (reqFieldMatch) {
         return new QueryTermScorer(query, request.getSearcher().getReader(), fieldName);

Modified: lucene/solr/trunk/src/java/org/apache/solr/util/HighlightingUtils.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/util/HighlightingUtils.java?rev=821555&r1=821554&r2=821555&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/util/HighlightingUtils.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/util/HighlightingUtils.java Sun Oct  4 16:24:39
2009
@@ -90,14 +90,6 @@
    
    /**
     * @deprecated use DefaultSolrHighlighter
-    * @see DefaultSolrHighlighter
-    */
-   public static QueryTermScorer getQueryScorer(Query query, String fieldName, SolrQueryRequest
request) {
-     return HIGHLIGHTER.getQueryScorerX(query, fieldName, request);
-   }
-   
-   /**
-    * @deprecated use DefaultSolrHighlighter
     * @see DefaultSolrHighlighter#getHighlightFields
     */
    public static String[] getHighlightFields(Query query, SolrQueryRequest request, String[]
defaultFields) {
@@ -145,9 +137,6 @@
   Highlighter getHighlighterX(Query query, String fieldName, SolrQueryRequest request) {
     return getHighlighter(query, fieldName, request);
   }
-  QueryTermScorer getQueryScorerX(Query query, String fieldName, SolrQueryRequest request)
{
-    return getQueryScorer(query, fieldName, request);
-  }
   int getMaxSnippetsX(String fieldName, SolrQueryRequest request) {
     return getMaxSnippets(fieldName, HighlightingUtils.getParams(request));
   }



Mime
View raw message