[
https://issues.apache.org/jira/browse/LUCENE-5095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701580#comment-13701580
]
Robert Muir commented on LUCENE-5095:
-------------------------------------
I strongly disagree with cluttering up these APIs with such implementation
details: I'd rather do nothing than do that. The idea here is instead to give
additional messages for *human* debugging.
NumericDocValues for example has a simple API:
{code}
/**
* Returns the numeric value for the specified document ID.
* @param docID document ID to lookup
* @return numeric value
*/
public abstract long get(int docID);
{code}
It needs nothing else: toString is already in the method signature: its perfect
for this type of thing.
> Add useful toString()s to DocValues impls
> -----------------------------------------
>
> Key: LUCENE-5095
> URL: https://issues.apache.org/jira/browse/LUCENE-5095
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Robert Muir
>
> Currently, you have no insight into what these are doing (what kind of
> compression does your numerics have, how much RAM are the datastructures
> taking up, so on.
> So I think we should add some cheap toString's (nothing heavy), things like
> {code}
> @Override
> public String toString() {
> return "Lucene42Numeric(compression=TABLE,bpv=" + bitsPerValue)";
> }
> {code}
> and so on. Maybe we could think about printing them from CheckIndex when
> verbose=true too.
--
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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]