Re: Unnecessary messages creation by LogMergePolicy

2008-12-05 Thread Michael McCandless
I like the method, but how about the name verbose(), ie: if (verbose()) ... Mike Shai Erera wrote: I'll open an issue and work out a patch. Basically it means infoStream != null, although in LogMergePolicy I might add a specific method for that, because the messages are output if

Re: Unnecessary messages creation by LogMergePolicy

2008-12-05 Thread Shai Erera
I'll open an issue and work out a patch. Basically it means infoStream != null, although in LogMergePolicy I might add a specific method for that, because the messages are output if the IndexWriter member is not null and its infoStream is not null (this check is done by IndexWriter). Therefore I

Re: Unnecessary messages creation by LogMergePolicy

2008-12-05 Thread Michael McCandless
I agree, it is a best practice and we should follow it. Can you work out a patch & open an issue? I assume this means "if (infoStream != null)..." in this case. Mike Shai Erera wrote: Hi As I looked at the code in LogMergePolicy (and its sub-classes), I came across such lines:

Unnecessary messages creation by LogMergePolicy

2008-12-05 Thread Shai Erera
Hi As I looked at the code in LogMergePolicy (and its sub-classes), I came across such lines: message("findMergesToExpungeDeletes: " + numSegments + " segments"); Those lines print to the info stream (eventually) if it's not null. If one follows Java logging best practices, then any logging