Github user fsparv commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/422#discussion_r204751858
--- 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 thought about allowing the user to specify the '-' but it just feels
weird to think about. You wind up reading it like "Preemptively create a
collection at -3 hours in the future relative to the last collection" or
"Preemptively create a collection when it's needed -3 hours" rather than the
much more natural thought/sentence "Preemptively create a collection 3 hours
before it's needed." So I felt the API "read" better this way.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]