Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/422#discussion_r204818612
  
    --- Diff: 
solr/core/src/java/org/apache/solr/cloud/api/collections/CreateAliasCmd.java ---
    @@ -136,6 +139,16 @@ private Instant parseStart(String str, TimeZone zone) {
         return start;
       }
     
    +  private void checkPreemptiveCreateWindow(String str) {
    +    if (StringUtils.isNotBlank(str)) {
    +      try {
    +        new DateMathParser().parseMath( "-" + str);
    --- End diff --
    
    I do like that we don't make the user specify it -- that's nice.  I agree 
it'd be confusing to know when to use +/- if we made users specify it.  It'd be 
nice if other parts of Solr had this convenience, like range facet gap.  I'm 
just saying we should internally convert to full DateMath eagerly; otherwise 
it's this partial datemath type of string and thus it's inaccurate to even say, 
via the variable name, that it's date math.  Or... maybe we allow DateMath to 
have the leading operator be optional defaulting to '+', and thus it's accurate 
to say that "1SEC" is date math?


---

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

Reply via email to