[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread Uwe Schindler (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15145921#comment-15145921
 ] 

Uwe Schindler commented on LUCENE-7027:
---

OK, I will commit this to "master". Should I backport to 5.5? I can backport to 
branch_5x, but thats useless if we don't put it into 5.5.

> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
> Attachments: LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146002#comment-15146002
 ] 

Michael McCandless commented on LUCENE-7027:


Thanks [~thetaphi]!  Patch looks good to me!

bq. The problem is that the query parser uses the CachingTokenFilter, I assume. 
right?

Yeah ... it's {{SimpleQueryParser.java}} in ES, and it seems to be poached 
maybe from {{AnalyzerQueryNodeProcessor.java}} in Lucene's flexible query 
parser, where it needs to make two passes over the tokens the tokenizer created 
from the text, I think?

bq. Should I backport to 5.5? 

+1, I'll mark this blocker for 5.5, and cancel the current RC1 and respin.

Thanks [~thetaphi]!

> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146059#comment-15146059
 ] 

ASF subversion and git services commented on LUCENE-7027:
-

Commit 42ae21cb9ae36dde4d5ffda16e06976b369b95e4 in lucene-solr's branch 
refs/heads/master from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=42ae21c ]

LUCENE-7027: Fixed NumericTermAttribute to not throw IllegalArgumentException 
after NumericTokenStream was exhausted


> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146064#comment-15146064
 ] 

ASF subversion and git services commented on LUCENE-7027:
-

Commit 7abc0c6de6ae51f0b3b805c8d9d83185e78bff69 in lucene-solr's branch 
refs/heads/branch_5x from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7abc0c6 ]

LUCENE-7027: Fixed NumericTermAttribute to not throw IllegalArgumentException 
after NumericTokenStream was exhausted

# Conflicts:
#   lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
#   
lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java


> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146065#comment-15146065
 ] 

ASF subversion and git services commented on LUCENE-7027:
-

Commit d83f57901f38334c103678b985cf875a9ef51013 in lucene-solr's branch 
refs/heads/branch_5_5 from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d83f579 ]

LUCENE-7027: Fixed NumericTermAttribute to not throw IllegalArgumentException 
after NumericTokenStream was exhausted

# Conflicts:
#   lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
#   
lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java


> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146081#comment-15146081
 ] 

ASF subversion and git services commented on LUCENE-7027:
-

Commit 40f15765ba7605d1b5f3897fc3f97f2848635d77 in lucene-solr's branch 
refs/heads/branch_5_5 from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=40f1576 ]

LUCENE-7027: Fix accidental deprecation of test


> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146083#comment-15146083
 ] 

ASF subversion and git services commented on LUCENE-7027:
-

Commit aaa05e20e789afca2ebc8443b248d512318cd201 in lucene-solr's branch 
refs/heads/branch_5x from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=aaa05e2 ]

LUCENE-7027: Fix accidental deprecation of test


> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146190#comment-15146190
 ] 

Michael McCandless commented on LUCENE-7027:


Thanks [~thetaphi]!

> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (LUCENE-7027) NumericTermAttribute throws IAE after NumericTokenStream is exhausted

2016-02-13 Thread Lee Hinman (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15146214#comment-15146214
 ] 

Lee Hinman commented on LUCENE-7027:


Thanks [~thetaphi]!

> NumericTermAttribute throws IAE after NumericTokenStream is exhausted
> -
>
> Key: LUCENE-7027
> URL: https://issues.apache.org/jira/browse/LUCENE-7027
> Project: Lucene - Core
>  Issue Type: Bug
>Affects Versions: 5.5, master, 6.0
>Reporter: Michael McCandless
>Assignee: Uwe Schindler
>Priority: Blocker
> Fix For: 5.5, master, 6.0
>
> Attachments: LUCENE-7027-master.patch, LUCENE-7027-master.patch, 
> LUCENE-7027-master.patch
>
>
> This small test:
> {noformat}
>   public void testCloneFullPrecisionToken() throws Exception {
> FieldType fieldType = new FieldType(IntField.TYPE_NOT_STORED);
> fieldType.setNumericPrecisionStep(Integer.MAX_VALUE);
> Field field = new IntField("field", 17, fieldType);
> TokenStream tokenStream = new CachingTokenFilter(field.tokenStream(null, 
> null));
> assertTrue(tokenStream.incrementToken());
>   }
> {noformat}
> hits this unexpected exception:
> {noformat}
> There was 1 failure:
> 1) 
> testCloneFullPrecisionToken(org.apache.lucene.analysis.TestNumericTokenStream)
> java.lang.IllegalArgumentException: Illegal shift value, must be 0..31; got 
> shift=2147483647
>   at 
> __randomizedtesting.SeedInfo.seed([2E1E93EF810CB5F7:EF1304A849574BC7]:0)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCodedBytes(NumericUtils.java:175)
>   at 
> org.apache.lucene.util.NumericUtils.intToPrefixCoded(NumericUtils.java:133)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.getBytesRef(NumericTokenStream.java:165)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:217)
>   at 
> org.apache.lucene.analysis.NumericTokenStream$NumericTermAttributeImpl.clone(NumericTokenStream.java:148)
>   at 
> org.apache.lucene.util.AttributeSource$State.clone(AttributeSource.java:55)
>   at 
> org.apache.lucene.util.AttributeSource.captureState(AttributeSource.java:288)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:96)
>   at 
> org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:70)
>   at 
> org.apache.lucene.analysis.TestNumericTokenStream.testCloneFullPrecisionToken(TestNumericTokenStream.java:138)
> {noformat}
> because {{CachingTokenFilter}} expects that it can {{captureState}} after 
> calling {{end}} but {{NumericTokenStream}} gets angry about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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