[
https://issues.apache.org/jira/browse/LUCENE-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704047#action_12704047
]
Michael McCandless commented on LUCENE-1500:
--------------------------------------------
bq. Should it not solve the issue?
The change to highlighter (which is committed, on trunk) is simply to throw a
more meaningful, checked exception (InvalidTokenOffsetsException) when the
Token has out-of-bounds offsets. On upgrading to this, this is an exception
your code needs to handle.
But this issue doesn't fix the root causes that actually produce Tokens with
incorrect offsets -- that's very app specific. EG, the particular case that
led to this issue was SOLR-925 (which is now fixed).
Are you actually hitting this exception at runtime, or noting that you need to
handle it at compilation time?
> 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: Mark Harwood
> Fix For: 2.9
>
> Attachments: Lucene-1500-NewException.patch,
> Lucene-1500-NewException.patch, 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: [email protected]
For additional commands, e-mail: [email protected]