[
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
Thanks rmuir, setEnableChecks is the piece i was missing and using it makes the
test pass, but i'm still a little confused by the rest of your comment and what
i'm seeing in the tests...
bq. But we knew about this anyway: existing tests for LimitTokenCountFilter
already do setEnableChecks(false) for this exact reason... this is just an
explanation of why.
1) HunspellStemFilterTest is the only lucene/analysis test i see using
setEnableChecks (although there do seem to be some highlighter tests that use
it, and TestIndexWriterExceptions uses it to ignore secondary problems since
it's going out of it's way to force exceptions)
2) i don't see any existing tests for LimitTokenCountFilter .. were they
deleted by mistake?
3) the closest thing i see to a test of LimitTokenCountFilter is
TestLimitTokenCountAnalyzer - i realize now the reason it's
testLimitTokenCountAnalyzer doesn't get the same failure is because it's
wrapping WhitespaceAnalyzer, StandardAnalyzer - should those be changed to use
MockTokenizer?
4) TestLimitTokenCountAnalyzer also has a testLimitTokenCountIndexWriter that
uses MockAnalyzer w/o calling setEnableChecks(false) which seems like it should
trigger the same failure i got since it uses MockTokenizer, but in general that
test looks suspicious, as it seems to add the *exact* number of tokens that the
limit is configured for, and then asserts that the last token is in the index -
but never actaully triggers the limiting logic since exactly the allowed umber
of tokens are used.
> 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, 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]