lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: svn commit: r819314 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java src/test/org/apache/solr/highlight/HighlighterTest.java
Date Sun, 27 Sep 2009 16:09:19 GMT
Thank you Koji!

Indeed - those need to default true now.

Nice eyes, and thanks for looking over!

Koji Sekiguchi wrote:
> > Also make both options default to true.
>
> If so, isn't this line (from HighlightComponent) needed to be
> also true by default?
>
>        boolean rewrite =
> !(Boolean.valueOf(req.getParams().get(HighlightParams.USE_PHRASE_HIGHLIGHTER))
> &&
> Boolean.valueOf(req.getParams().get(HighlightParams.HIGHLIGHT_MULTI_TERM)));
>
>
> I think MultiTermQueries are converted to ConstantScoreQuery
> by rewrite?
>
> Koji
>
>
> markrmiller@apache.org wrote:
>> Author: markrmiller
>> Date: Sun Sep 27 13:58:30 2009
>> New Revision: 819314
>>
>> URL: http://svn.apache.org/viewvc?rev=819314&view=rev
>> Log:
>> SOLR-1221: Change Solr Highlighting to use the SpanScorer with
>> MultiTerm expansion by default
>>
>> Modified:
>>     lucene/solr/trunk/CHANGES.txt
>>    
>> lucene/solr/trunk/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
>>
>>    
>> lucene/solr/trunk/src/test/org/apache/solr/highlight/HighlighterTest.java
>>
>>
>> Modified: lucene/solr/trunk/CHANGES.txt
>> URL:
>> http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=819314&r1=819313&r2=819314&view=diff
>>
>> ==============================================================================
>>
>> --- lucene/solr/trunk/CHANGES.txt (original)
>> +++ lucene/solr/trunk/CHANGES.txt Sun Sep 27 13:58:30 2009
>> @@ -503,8 +503,8 @@
>>  45. SOLR-1078: Fixes to WordDelimiterFilter to avoid splitting or
>> dropping
>>      international non-letter characters such as non spacing marks.
>> (yonik)
>>      -46. SOLR-825: Enables highlighting for
>> range/wildcard/fuzzy/prefix queries if using
>> hl.usePhraseHighlighter=true
>> -    and hl.highlightMultiTerm=true.  (Mark Miller)
>> +46. SOLR-825, SOLR-1221: Enables highlighting for
>> range/wildcard/fuzzy/prefix queries if using
>> hl.usePhraseHighlighter=true
>> +    and hl.highlightMultiTerm=true. Also make both options default
>> to true. (Mark Miller)
>>  
>>  47. SOLR-1174: Fix Logging admin form submit url for multicore.
>> (Jacob Singh via shalin)
>>  
>>
>> 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=819314&r1=819313&r2=819314&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 Sep 27 13:58:30 2009
>> @@ -144,7 +144,7 @@
>>     */
>>    private QueryScorer getSpanQueryScorer(Query query, String
>> fieldName, TokenStream tokenStream, SolrQueryRequest request) throws
>> IOException {
>>      boolean reqFieldMatch =
>> request.getParams().getFieldBool(fieldName,
>> HighlightParams.FIELD_MATCH, false);
>> -    Boolean highlightMultiTerm =
>> request.getParams().getBool(HighlightParams.HIGHLIGHT_MULTI_TERM);
>> +    Boolean highlightMultiTerm =
>> request.getParams().getBool(HighlightParams.HIGHLIGHT_MULTI_TERM, true);
>>      if(highlightMultiTerm == null) {
>>        highlightMultiTerm = false;
>>      }
>> @@ -306,8 +306,9 @@
>>              }
>>                                        Highlighter highlighter;
>> -            if
>> (Boolean.valueOf(req.getParams().get(HighlightParams.USE_PHRASE_HIGHLIGHTER)))
>> {
>> -              // wrap CachingTokenFilter around TokenStream for reuse
>> +            if
>> (Boolean.valueOf(req.getParams().get(HighlightParams.USE_PHRASE_HIGHLIGHTER,
>> "true"))) {
>> +              // TODO: this is not always necessary - eventually we
>> would like to avoid this wrap
>> +              //       when it is not needed.
>>                tstream = new CachingTokenFilter(tstream);
>>                               // get highlighter
>>
>> Modified:
>> lucene/solr/trunk/src/test/org/apache/solr/highlight/HighlighterTest.java
>>
>> URL:
>> http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/highlight/HighlighterTest.java?rev=819314&r1=819313&r2=819314&view=diff
>>
>> ==============================================================================
>>
>> ---
>> lucene/solr/trunk/src/test/org/apache/solr/highlight/HighlighterTest.java
>> (original)
>> +++
>> lucene/solr/trunk/src/test/org/apache/solr/highlight/HighlighterTest.java
>> Sun Sep 27 13:58:30 2009
>> @@ -585,6 +585,7 @@
>>      args.put("hl.fl", "t_text");
>>      args.put("hl.fragsize", "40");
>>      args.put("hl.snippets", "10");
>> +    args.put("hl.usePhraseHighlighter", "false");
>>  
>>      TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
>>        "standard", 0, 200, args);
>>
>>
>>
>>   
>


-- 
- Mark

http://www.lucidimagination.com




Mime
View raw message