[
https://issues.apache.org/jira/browse/SOLR-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478318#comment-13478318
]
Robert Muir commented on SOLR-3961:
-----------------------------------
For testing LimitTokenCountFilter, you need to set
http://lucene.apache.org/core/4_0_0/test-framework/org/apache/lucene/analysis/MockTokenizer.html#setEnableChecks%28boolean%29
Thats because LimitTokenCountFilter violates the workflow of the standard
tokenstream API
(http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/analysis/TokenStream.html)...
it cuts off its consumer and calls end() even while that consumer still has
more tokens: this could easily cause unexpected side effects and bugs.
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.
> 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]