[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602264#comment-13602264
 ] 

Shai Erera commented on LUCENE-4833:


good catch. But why do you throw NPE? the rest of the setXYZ methods respect 
null by setting the default. I don't like that setMP is not consistent with the 
rest of the setters.

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Adrien Grand (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602265#comment-13602265
 ] 

Adrien Grand commented on LUCENE-4833:
--

Good point. I copied the behavior of setCodec which throws a NPE although you 
are right that most methods seem to set the default value...

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602266#comment-13602266
 ] 

Shai Erera commented on LUCENE-4833:


I think that setCodec should also be modified then, to something like that:

{code}
if (codec == null) {
codec = Codec.getDefault();
if (codec == null) {
  throw new NullPointerException();
}
}
{code}

Just like the ctor does. And the NPE should include some message too (both in 
the ctor and setter).

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Adrien Grand (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602269#comment-13602269
 ] 

Adrien Grand commented on LUCENE-4833:
--

I'm not sure I like the fact that passing null to setXXX actually sets the 
default value, what do other committers think?

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602272#comment-13602272
 ] 

Robert Muir commented on LUCENE-4833:
-

it seems more likely that someone would pass null due to a program mistake, 
rather than
wanting the defaults.

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Adrien Grand (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602274#comment-13602274
 ] 

Adrien Grand commented on LUCENE-4833:
--

My point is that if someone wants to use the default value, all he has to do is 
to never call the setter? Moreover users can't pass null to methods that expect 
primitive types (such as setMaxBufferedDocs) so throwing an exception when 
encountering null would be more consistent?

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602280#comment-13602280
 ] 

Shai Erera commented on LUCENE-4833:


We need to be consistent across the setters. We throw IllegalArg in the other 
setters (which take primitives), so maybe throw that and not NPE?

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Adrien Grand (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602285#comment-13602285
 ] 

Adrien Grand commented on LUCENE-4833:
--

bq. We throw IllegalArg in the other setters (which take primitives), so maybe 
throw that and not NPE?

+1 I'll update the patch.

 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Commit Tag Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602487#comment-13602487
 ] 

Commit Tag Bot commented on LUCENE-4833:


[trunk commit] Adrien Grand
http://svn.apache.org/viewvc?view=revisionrevision=1456564

LUCENE-4833: Make IndexWriterConfig setters throw an exception when passed null 
if null is not a valid value.



 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch, LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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



[jira] [Commented] (LUCENE-4833) Fix default MergePolicy in IndexWriterConfig

2013-03-14 Thread Commit Tag Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13602502#comment-13602502
 ] 

Commit Tag Bot commented on LUCENE-4833:


[branch_4x commit] Adrien Grand
http://svn.apache.org/viewvc?view=revisionrevision=1456567

LUCENE-4833: Make IndexWriterConfig setters throw an exception when passed null 
if null is not a valid value (merged from r1456564).



 Fix default MergePolicy in IndexWriterConfig
 

 Key: LUCENE-4833
 URL: https://issues.apache.org/jira/browse/LUCENE-4833
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
 Attachments: LUCENE-4833.patch, LUCENE-4833.patch


 Although the default merge policy is TieredMergePolicy (as documented in 
 IndexWriterConfig constructor), setMergePolicy assumes that the default is 
 LogByteSizeMergePolicy.

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