lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: DR.getCommitUserData() vs DR.getIndexCommit().getUserData()
Date Wed, 08 Feb 2012 00:33:52 GMT
Related: investigating these methods, I think the javadocs/possibly
other method names could be improved.

In my opinion the problem is the use of 'current' which is:
1. inconsistent/trappy: its getVersion()/getCurrentVersion(Directory),
but getCommitUserData()/getCommitUserData(Directory) <-- the
'overloading' here is not good.
2. ambiguous: its intended to be interpreted as 'most recent' for
these static methods that return Directory, but this word 'current'
could also be read as 'currently in use'.

So for example, when the javadocs says: 'from current index segments
file', I think for these static Directory-methods we could try to
consistently rephrase as 'from most recent commit to the provided
directory' or something more clear.

On Tue, Feb 7, 2012 at 7:16 PM, Ryan McKinley <ryantxu@gmail.com> wrote:
> On Tue, Feb 7, 2012 at 3:11 PM, Michael McCandless
> <lucene@mikemccandless.com> wrote:
>> Hmmm no difference.  I don't like ambiguity... we should remove one!
>> (I think remove DR's method?).
>>
>
> +1  If they do the same thing, we should try to get rid of one.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>



-- 
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message