lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Updated: (LUCENE-1825) Incorrect usage of AttributeSource.addAttribute/getAttribute leads to failures when onlyUseNewAPI=true
Date Fri, 21 Aug 2009 14:56:14 GMT


Uwe Schindler updated LUCENE-1825:

    Attachment: LUCENE-1825.patch

Here a new patch: The default LuceneTestCase uses onlyUseNewAPI=false (which is the default).
Some tests were rewritten to use a special TestCase superclass (see previous file, but updated
in this patch), that runs all tests two times with this flag enabled and disabled.

I converted all core analyzer tests, DocumentsWriter and the likely failing highlighter, queryparser
and memory index tests.

> Incorrect usage of AttributeSource.addAttribute/getAttribute leads to failures when onlyUseNewAPI=true
> ------------------------------------------------------------------------------------------------------
>                 Key: LUCENE-1825
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>    Affects Versions: 2.9
>            Reporter: Tim Smith
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 2.9
>         Attachments:, LUCENE-1825.patch, LUCENE-1825.patch,
> when seting "use only new API" for TokenStream, i received the following exception:
> {code}
>    [junit] Caused by: java.lang.IllegalArgumentException: This AttributeSource does not
have the attribute 'interface org.apache.lucene.analysis.tokenattributes.TermAttribute'.
>     [junit] 	at org.apache.lucene.util.AttributeSource.getAttribute(
>     [junit] 	at org.apache.lucene.index.TermsHashPerField.start(
>     [junit] 	at org.apache.lucene.index.DocInverterPerField.processFields(
>     [junit] 	at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(
>     [junit] 	at org.apache.lucene.index.DocumentsWriter.updateDocument(
>     [junit] 	at org.apache.lucene.index.DocumentsWriter.updateDocument(
>     [junit] 	at org.apache.lucene.index.IndexWriter.updateDocument(
> {code}
> However, i can't actually see the culprit that caused this exception
> suggest that the IllegalArgumentException include "getClass().getName()" in order to
be able to identify which TokenStream implementation actually caused this

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message