You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "John Wang (JIRA)" <ji...@apache.org> on 2012/11/03 16:59:12 UTC
[jira] [Created] (LUCENE-4530) ArrayOutofBoundsException with
WhiteSpaceAnalyzer
John Wang created LUCENE-4530:
---------------------------------
Summary: ArrayOutofBoundsException with WhiteSpaceAnalyzer
Key: LUCENE-4530
URL: https://issues.apache.org/jira/browse/LUCENE-4530
Project: Lucene - Core
Issue Type: Bug
Components: modules/analysis
Affects Versions: 4.0
Reporter: John Wang
Run the following test and get an AOOBE.
@Test
public void testLucene() throws Exception {
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
String text = "أعجبني مقطع فيديو في الملفات السرية للإخوان | السمع والطاعة | سري جداً ヅ ";
org.apache.lucene.analysis.TokenStream stream = new WhitespaceTokenizer(Version.LUCENE_40, new CharSequenceReader(text));
CharTermAttribute termAttr = stream.getAttribute(CharTermAttribute.class);
while (stream.incrementToken()){ System.out.println(termAttr.toString()); }
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4530) ArrayOutofBoundsException with
WhiteSpaceAnalyzer
Posted by "John Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490050#comment-13490050 ]
John Wang commented on LUCENE-4530:
-----------------------------------
I should have read the docs :) My bad!
> ArrayOutofBoundsException with WhiteSpaceAnalyzer
> -------------------------------------------------
>
> Key: LUCENE-4530
> URL: https://issues.apache.org/jira/browse/LUCENE-4530
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/analysis
> Affects Versions: 4.0
> Reporter: John Wang
>
> Run the following test and get an AOOBE.
> @Test
> public void testLucene() throws Exception {
> Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
> String text = "أعجبني مقطع فيديو في الملفات السرية للإخوان | السمع والطاعة | سري جداً ヅ ";
> org.apache.lucene.analysis.TokenStream stream = new WhitespaceTokenizer(Version.LUCENE_40, new CharSequenceReader(text));
> CharTermAttribute termAttr = stream.getAttribute(CharTermAttribute.class);
> while (stream.incrementToken()){ System.out.println(termAttr.toString()); }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Closed] (LUCENE-4530) ArrayOutofBoundsException with
WhiteSpaceAnalyzer
Posted by "John Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Wang closed LUCENE-4530.
-----------------------------
Thanks Rob for the prompt response!
> ArrayOutofBoundsException with WhiteSpaceAnalyzer
> -------------------------------------------------
>
> Key: LUCENE-4530
> URL: https://issues.apache.org/jira/browse/LUCENE-4530
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/analysis
> Affects Versions: 4.0
> Reporter: John Wang
>
> Run the following test and get an AOOBE.
> @Test
> public void testLucene() throws Exception {
> Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
> String text = "أعجبني مقطع فيديو في الملفات السرية للإخوان | السمع والطاعة | سري جداً ヅ ";
> org.apache.lucene.analysis.TokenStream stream = new WhitespaceTokenizer(Version.LUCENE_40, new CharSequenceReader(text));
> CharTermAttribute termAttr = stream.getAttribute(CharTermAttribute.class);
> while (stream.incrementToken()){ System.out.println(termAttr.toString()); }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4530) ArrayOutofBoundsException with
WhiteSpaceAnalyzer
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490049#comment-13490049 ]
Robert Muir commented on LUCENE-4530:
-------------------------------------
I'm sorry the exception sucks... i'm still thinking of a better way to give a "nice" exception without it being a per-token check in incrementToken :(
> ArrayOutofBoundsException with WhiteSpaceAnalyzer
> -------------------------------------------------
>
> Key: LUCENE-4530
> URL: https://issues.apache.org/jira/browse/LUCENE-4530
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/analysis
> Affects Versions: 4.0
> Reporter: John Wang
>
> Run the following test and get an AOOBE.
> @Test
> public void testLucene() throws Exception {
> Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
> String text = "أعجبني مقطع فيديو في الملفات السرية للإخوان | السمع والطاعة | سري جداً ヅ ";
> org.apache.lucene.analysis.TokenStream stream = new WhitespaceTokenizer(Version.LUCENE_40, new CharSequenceReader(text));
> CharTermAttribute termAttr = stream.getAttribute(CharTermAttribute.class);
> while (stream.incrementToken()){ System.out.println(termAttr.toString()); }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (LUCENE-4530) ArrayOutofBoundsException with
WhiteSpaceAnalyzer
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir resolved LUCENE-4530.
---------------------------------
Resolution: Not A Problem
I set this to -1 intentionally so that people who don't call reset() will get AIOOBE and fix bugs in their applications.
Since lucene 2.9, reset() was step 2 in the tokensream workflow:
http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/analysis/TokenStream.html
This is linked to extensively from the javadocs (e.g. ANalyer.tokenstream method) as well.
> ArrayOutofBoundsException with WhiteSpaceAnalyzer
> -------------------------------------------------
>
> Key: LUCENE-4530
> URL: https://issues.apache.org/jira/browse/LUCENE-4530
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/analysis
> Affects Versions: 4.0
> Reporter: John Wang
>
> Run the following test and get an AOOBE.
> @Test
> public void testLucene() throws Exception {
> Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);
> String text = "أعجبني مقطع فيديو في الملفات السرية للإخوان | السمع والطاعة | سري جداً ヅ ";
> org.apache.lucene.analysis.TokenStream stream = new WhitespaceTokenizer(Version.LUCENE_40, new CharSequenceReader(text));
> CharTermAttribute termAttr = stream.getAttribute(CharTermAttribute.class);
> while (stream.incrementToken()){ System.out.println(termAttr.toString()); }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org