lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4642) TokenizerFactory should provide a create method with a given AttributeSource
Date Mon, 21 Jan 2013 13:48:12 GMT


Steve Rowe updated LUCENE-4642:

    Attachment: LUCENE-4642.patch

I think this is a good addition.

Here is a patch against trunk.  Four tokenizers and their factories have been removed, and
so aren't present in this patch: {{ChineseTokenizer}}, {{ArabicLetterTokenizer}}, {{RussianLetterTokenizer}},
and {{CJKTokenizer}}.

I've also taken the opportunity to narrow the return type to the class being instantiated
from all analysis factory {{create()}} methods where possible.

bq. in order not to break existing factories, I think it would be better to make this new
method throw UOE by default instead of being abstract.

I agree - I did this in the patch.
> TokenizerFactory should provide a create method with a given AttributeSource
> ----------------------------------------------------------------------------
>                 Key: LUCENE-4642
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>    Affects Versions: 4.1
>            Reporter: Renaud Delbru
>            Assignee: Steve Rowe
>              Labels: analysis, attribute, tokenizer
>             Fix For: 4.2, 5.0
>         Attachments: LUCENE-4642.patch, LUCENE-4642.patch
> All tokenizer implementations have a constructor that takes a given AttributeSource as
parameter (LUCENE-1826). However, the TokenizerFactory does not provide an API to create tokenizers
with a given AttributeSource.
> Side note: There are still a lot of tokenizers that do not provide constructors that
take AttributeSource and AttributeFactory.

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:

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

View raw message