[ 
https://issues.apache.org/jira/browse/SOLR-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793653#action_12793653
 ] 

Robert Muir commented on SOLR-1674:
-----------------------------------

{quote}
Hmmm, isn't it a bug that this passes?

w/o the 1670 fix, we get "ab/ab/ab" (repeated tokens all at the same position). 
That's not the same as three "ab" tokens in a row. 
{quote}

The tests pass because it "ab", "ab", "ab". If we want to validate pos incs, we 
should change the test to:

{code}
assertTokenizesTo(map, "a b", 
  new String[] { "ab", "ab", "ab" },
  new int [] { 1, 0, 0 });
{code}

this way the posIncs are tested too.

{quote}
Also, we seem to have lost matching flexibility with overlapping tokens. "a/aa" 
should be the same as "aa/a", but if you change the order of overlapping tokens 
now, the tests fail.
{quote}

This "flexibility" caused things such as SOLR-1670, SOLR-1667, SOLR-1662, and 
SOLR-1660. When I switched to less "flexible" tests, these bugs were found. So 
sorry to see it go.


> improve analysis tests, cut over to new API
> -------------------------------------------
>
>                 Key: SOLR-1674
>                 URL: https://issues.apache.org/jira/browse/SOLR-1674
>             Project: Solr
>          Issue Type: Test
>          Components: Schema and Analysis
>            Reporter: Robert Muir
>            Assignee: Mark Miller
>         Attachments: SOLR-1674.patch, SOLR-1674.patch, SOLR-1674_speedup.patch
>
>
> This patch
> * converts all analysis tests to use the new tokenstream api
> * converts most tests to use the more stringent assertion mechanisms from 
> lucene
> * adds new tests to improve coverage
> Most bugs found by more stringent testing have been fixed, with the exception 
> of SynonymFilter.
> The problems with this filter are more serious, the previous tests were 
> essentially a no-op.
> The new tests for SynonymFilter test the current behavior, but have FIXMEs 
> with what I think the old test wanted to expect in the comments.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to