[ 
https://issues.apache.org/jira/browse/LUCENE-5404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876033#comment-13876033
 ] 

Areek Zillur edited comment on LUCENE-5404 at 1/19/14 10:36 PM:
----------------------------------------------------------------

Updated Patch (Thanks for the review Michael and Robert):
  - count() -> getCount()
  - doc to make it clear that count represents only the entries the iterator 
has seen so far

Regarding the getCount() in the InputIterator API, it is just the number of 
entries the iterator has seen so far. So it will be valid to call it only after 
a Lookup has consumed all the entries from the Iterator. I think it will be 
something useful to know the # of entries a lookup was built with, given some 
of the iterator skips 'invalid' entries as it feeds it to the lookups? I can 
also see this being useful when suggesters are run in distributed mode, maybe 
when shards dont respond, this can be used to report the % of entries that the 
lookup ran against?


was (Author: areek):
Updated Patch:
  - count() -> getCount()
  - doc to make it clear that count represents only the entries the iterator 
has seen so far

Regarding the getCount() in the InputIterator API, it is just the number of 
entries the iterator has seen so far. So it will be valid to call it only after 
a Lookup has consumed all the entries from the Iterator. I think it will be 
something useful to know the # of entries a lookup was built with, given some 
of the iterator skips 'invalid' entries as it feeds it to the lookups? I can 
also see this being useful when suggesters are run in distributed mode, maybe 
when shards dont respond, this can be used to report the % of entries that the 
lookup ran against?

> Add support to get number of entries a Suggester Lookup was built with and 
> minor refactorings
> ---------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5404
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5404
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>            Reporter: Areek Zillur
>             Fix For: 5.0, 4.7
>
>         Attachments: LUCENE-5404.patch, LUCENE-5404.patch
>
>
> It would be nice to be able to tell the number of entries a suggester lookup 
> was built with. This would let components using lookups to keep some stats 
> regarding how many entries were used to build a lookup.
> Additionally, Dictionary could use InputIterator rather than the 
> BytesRefIteratator, as most of the implmentations now use it.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to