lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1500) Highlighter throws StringIndexOutOfBoundsException
Date Fri, 27 Feb 2009 21:51:15 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677549#action_12677549
] 

Hoss Man commented on LUCENE-1500:
----------------------------------

bq. The extent of my tracing suggests it's coming when the token stream is generated, which
looks to be part of the lucene highlighter: org.apache.lucene.search.highlight.TokenSources

with my limited knowledge of solr highlighting, that really doesn't sound right.

If the field has TermVectors, then the TokenStream used comes from there, otherwise it coems
from analyzing the stored field value -- either way the analyzer configured in Solr should
be setting the offset values, correct? 

hence my question on the solr thread where this first came up...
http://www.nabble.com/Error-with-highlighter-and-UTF-8-chars--to22156161.html#a22207917

bq. so what does the analysis screen tell you about each token produced with that input text
given your configuration?  in verbose mode it will show the start/end offsets for every token,
so it should be fairly easy to identify where the bug is. 

> Highlighter throws StringIndexOutOfBoundsException
> --------------------------------------------------
>
>                 Key: LUCENE-1500
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1500
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/highlighter
>    Affects Versions: 2.4
>         Environment: Found this running the example code in Solr (latest version).
>            Reporter: David Bowen
>            Assignee: Michael McCandless
>             Fix For: 2.4.1, 2.9
>
>         Attachments: LUCENE-1500.patch, patch.txt
>
>
> Using the canonical Solr example (ant run-example) I added this document (using exampledocs/post.sh):
> <add><doc>
>   <field name="id">Test for Highlighting StringIndexOutOfBoundsExcdption</field>
>   <field name="name">Some Name</field>
>   <field name="manu">Acme, Inc.</field>
>   <field name="features">Description of the features, mentioning various things</field>
>   <field name="features">Features also is multivalued</field>
>   <field name="popularity">6</field>
>   <field name="inStock">true</field>
> </doc></add>
> and then the URL http://localhost:8983/solr/select/?q=features&hl=true&hl.fl=features
caused the exception.
> I have a patch.  I don't know if it is completely correct, but it avoids this exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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