[
https://issues.apache.org/jira/browse/SOLR-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated SOLR-3961:
---------------------------
Attachment: SOLR-3961.patch
i modified one of the test schemas to include LImitTOkenCountFilterFactory to
quickly demonstrate the init failure, then banged out a quick fix to the
factory. for added measure, i added a unit test of the factory itself, and
seem to have uncovered another bug somewhere -- although i'm not yet clear if
it's in the Filter (violating the TokenStream contract) or in
BaseTokenStreamTestCase (trying to enforce the contract)...
{noformat}
[junit4:junit4] 2> NOTE: reproduce with: ant test
-Dtestcase=TestLimitTokenCountFilterFactory -Dtests.method=test
-Dtests.seed=D40B43DE6627A1AB -Dtests.slow=true -Dtests.locale=mk
-Dtests.timezone=Singapore -Dtests.file.encoding=US-ASCII
[junit4:junit4] FAILURE 0.13s | TestLimitTokenCountFilterFactory.test <<<
[junit4:junit4] > Throwable #1: java.lang.AssertionError: end() called
before incrementToken() returned false!
[junit4:junit4] > at
__randomizedtesting.SeedInfo.seed([D40B43DE6627A1AB:5C5F7C04C8DBCC53]:0)
[junit4:junit4] > at
org.apache.lucene.analysis.MockTokenizer.end(MockTokenizer.java:243)
[junit4:junit4] > at
org.apache.lucene.analysis.TokenFilter.end(TokenFilter.java:46)
[junit4:junit4] > at
org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents(BaseTokenStreamTestCase.java:239)
[junit4:junit4] > at
org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents(BaseTokenStreamTestCase.java:250)
[junit4:junit4] > at
org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents(BaseTokenStreamTestCase.java:262)
[junit4:junit4] > at
org.apache.lucene.analysis.miscellaneous.TestLimitTokenCountFilterFactory.test(TestLimitTokenCountFilterFactory.java:37)
{noformat}
I'm going to need another set of eyeballs on this.
> LimitTokenCountFilterFactory config parsing is totally broken
> -------------------------------------------------------------
>
> Key: SOLR-3961
> URL: https://issues.apache.org/jira/browse/SOLR-3961
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.0
> Reporter: Hoss Man
> Assignee: Hoss Man
> Fix For: 4.0.1, 4.1
>
> Attachments: SOLR-3961.patch
>
>
> As noted on the mailing list, LimitTokenCountFilterFactory throws a
> NumberFormatException because it tries to use the value of it's config param
> as a key to look up another param that it parses as an integer ... totally
> ridiculous.
--
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: [email protected]
For additional commands, e-mail: [email protected]