[ 
https://issues.apache.org/jira/browse/LUCENE-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated LUCENE-2110:
----------------------------------

    Attachment: LUCENE-2110.patch

Updated patch also incorporating the needed changes for SingleTermsEnum to make 
it work with new API. Now it is at least a 5-code-liner :-)

I also fixed a method call instead of parameter usage in TermRangeTermsEnum. 
Also added Mike's comment In my opinion, we should keep it as TermsEnum, even 
when seeking does not work, which is documented. In my code I often use 
PrefixTerm(s)Enum for autocomplete cases - works good - and for that it is only 
handles as a Term(s)Enum for iterating making it simplier to reuse code working 
on Term(s)Enums. Also made some mebers final, I forgot this during 
restructuring the code.

What I forgot to mention: I made the abstract methods in FilteredTermsEnum also 
throw IOException, so maybe subclasses, doing strange things, would compile.

> Change FilteredTermsEnum to work like Iterator, so it is not positioned and 
> next() must be always called first. Remove empty()
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2110
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2110
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: Flex Branch
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: Flex Branch
>
>         Attachments: LUCENE-2110.patch, LUCENE-2110.patch
>
>
> FilteredTermsEnum is confusing as it is initially positioned to the first 
> term. It should instead work like an uninitialized TermsEnum for a field 
> before the first call to next() or seek().
> Also document that not all FilteredTermsEnums may implement seek() as eg. NRQ 
> or Automaton are not able to support this. Seeking is also not needed for MTQ 
> at all, so seek can just throw UOE.

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to