lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (LUCENE-1794) implement reusableTokenStream for all contrib analyzers
Date Mon, 10 Aug 2009 14:22:14 GMT


Robert Muir commented on LUCENE-1794:

reset() is always called by IndexWriter before consuming the TokenStream; end() is called
as last operation on the TokenStream.

Uwe, this may be the case for IndexWriter, but if I do not explicitly call it like so in ThaiAnalyzer,
then ThaiWordFilter's reset() is not invoked:
  streams.result.reset(); // reset the ThaiWordFilter's state <-- right here

By calling reset I can ensure it happens regardless of what is consuming the tokenstream...
(such as my tests!) maybe this is overkill?

> implement reusableTokenStream for all contrib analyzers
> -------------------------------------------------------
>                 Key: LUCENE-1794
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/analyzers
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 2.9
>         Attachments: LUCENE-1794.patch, LUCENE-1794.patch
> most contrib analyzers do not have an impl for reusableTokenStream
> regardless of how expensive the back compat reflection is for indexing speed, I think
we should do this to mitigate any performance costs. hey, overall it might even be an improvement!
> the back compat code for non-final analyzers is already in place so this is easy money
in my opinion.

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