lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: highlighting error using 1.4rc
Date Mon, 02 Nov 2009 22:48:58 GMT
Umm - crap. This looks looks like a bug in a fix that just went in. My  
fault on the review. I'll fix it tonight when I get home -  
unfortunetly, both lucene and sold are about to be released...

- Mark

http://www.lucidimagination.com (mobile)

On Nov 2, 2009, at 5:17 PM, Jake Brownell <jakeb@Benetech.org> wrote:

> Hi,
>
> I've tried installing the latest (3rd) RC for Solr 1.4 and Lucene  
> 2.9.1. One of our integration tests, which runs against and embedded  
> server appears to be failing on highlighting. I've included the  
> stack trace and the configuration from solrconf. I'd appreciate any  
> insights. Please let me know what additional information would be  
> useful.
>
>
> Caused by: org.apache.solr.client.solrj.SolrServerException:  
> org.apache.solr.client.solrj.SolrServerException:  
> java.lang.ClassCastException:  
> org.apache.lucene.search.spans.SpanOrQuery cannot be cast to  
> org.apache.lucene.search.spans.SpanNearQuery
>            at  
> org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request 
> (EmbeddedSolrServer.java:153)
>            at  
> org.apache.solr.client.solrj.request.QueryRequest.process 
> (QueryRequest.java:89)
>            at org.apache.solr.client.solrj.SolrServer.query 
> (SolrServer.java:118)
>            at org.bookshare.search.solr.SolrSearchServerWrapper.query 
> (SolrSearchServerWrapper.java:96)
>            ... 29 more
> Caused by: org.apache.solr.client.solrj.SolrServerException:  
> java.lang.ClassCastException:  
> org.apache.lucene.search.spans.SpanOrQuery cannot be cast to  
> org.apache.lucene.search.spans.SpanNearQuery
>            at  
> org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request 
> (EmbeddedSolrServer.java:141)
>            ... 32 more
> Caused by: java.lang.ClassCastException:  
> org.apache.lucene.search.spans.SpanOrQuery cannot be cast to  
> org.apache.lucene.search.spans.SpanNearQuery
>            at  
> org.apache.lucene.search.highlight.WeightedSpanTermExtractor.collectSpanQueryFields(

> WeightedSpanTermExtractor.java:489)
>            at  
> org.apache.lucene.search.highlight.WeightedSpanTermExtractor.collectSpanQueryFields(

> WeightedSpanTermExtractor.java:484)
>            at  
> org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extractWeightedSpanTerms(

> WeightedSpanTermExtractor.java:249)
>            at  
> org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract 
> (WeightedSpanTermExtractor.java:230)
>            at  
> org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract 
> (WeightedSpanTermExtractor.java:158)
>            at  
> org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms( 
> WeightedSpanTermExtractor.java:414)
>            at  
> org.apache.lucene.search.highlight.QueryScorer.initExtractor 
> (QueryScorer.java:216)
>            at org.apache.lucene.search.highlight.QueryScorer.init 
> (QueryScorer.java:184)
>            at  
> org.apache.lucene.search.highlight.Highlighter.getBestTextFragments 
> (Highlighter.java:226)
>            at  
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting 
> (DefaultSolrHighlighter.java:335)
>            at  
> org.apache.solr.handler.component.HighlightComponent.process 
> (HighlightComponent.java:89)
>            at  
> org.apache.solr.handler.component.SearchHandler.handleRequestBody 
> (SearchHandler.java:203)
>            at  
> org.apache.solr.handler.RequestHandlerBase.handleRequest 
> (RequestHandlerBase.java:131)
>            at org.apache.solr.core.SolrCore.execute(SolrCore.java: 
> 1316)
>            at  
> org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request 
> (EmbeddedSolrServer.java:139)
>            ... 32 more
>
> I see in our solrconf the following for highlighting.
>
>  <highlighting>
>   <!-- Configure the standard fragmenter -->
>   <!-- This could most likely be commented out in the "default" case  
> -->
>   <fragmenter name="gap"  
> class="org.apache.solr.highlight.GapFragmenter" default="true">
>    <lst name="defaults">
>     <int name="hl.fragsize">100</int>
>    </lst>
>   </fragmenter>
>
>   <!-- A regular-expression-based fragmenter (f.i., for sentence  
> extraction) -->
>   <fragmenter name="regex"  
> class="org.apache.solr.highlight.RegexFragmenter">
>    <lst name="defaults">
>      <!-- slightly smaller fragsizes work better because of slop -->
>      <int name="hl.fragsize">70</int>
>      <!-- allow 50% slop on fragment sizes -->
>      <float name="hl.regex.slop">0.5</float>
>      <!-- a basic sentence pattern -->
>      <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
>    </lst>
>   </fragmenter>
>
>   <!-- Configure the standard formatter -->
>   <formatter name="html"  
> class="org.apache.solr.highlight.HtmlFormatter" default="true">
>    <lst name="defaults">
>     <str name="hl.simple.pre"><![CDATA[<strong>]]></str>
>     <str name="hl.simple.post"><![CDATA[</strong>]]></str>
>    </lst>
>   </formatter>
>  </highlighting>
>
>
>
> Thanks,
> Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message