Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/304#discussion_r161223342 --- Diff: solr/core/src/java/org/apache/solr/cloud/CreateAliasCmd.java --- @@ -30,13 +44,101 @@ import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.StrUtils; +import org.apache.solr.update.processor.TimeRoutedAliasUpdateProcessor; +import org.apache.solr.util.DateMathParser; +import org.apache.solr.util.TimeZoneUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import static java.time.format.DateTimeFormatter.ISO_INSTANT; +import static org.apache.solr.cloud.OverseerCollectionMessageHandler.COLL_CONF; +import static org.apache.solr.common.SolrException.ErrorCode.BAD_REQUEST; import static org.apache.solr.common.params.CommonParams.NAME; +import static org.apache.solr.common.params.CommonParams.TZ; +import static org.apache.solr.handler.admin.CollectionsHandler.ROUTED_ALIAS_COLLECTION_PROP_PFX; +import static org.apache.solr.update.processor.TimeRoutedAliasUpdateProcessor.DATE_TIME_FORMATTER; public class CreateAliasCmd implements Cmd { + + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + public static final String ROUTING_TYPE = "router.name"; + public static final String ROUTING_FIELD = "router.field"; + public static final String ROUTING_INCREMENT = "router.interval"; + public static final String ROUTING_MAX_FUTURE = "router.max-future-ms"; + public static final String START = "start"; + // Collection constants should all reflect names in the v2 structured input for this command, not v1 + // names used for CREATE + public static final String CREATE_COLLECTION_CONFIG = "create-collection.config"; --- End diff -- My concern isn't just about the duplication of the Strings/names, it's about the "set" of them here. Even if we could refer to a constant in some other class accessible to SolrJ, it would still be a maintenance burden to refer to the set of those that exist since it's redundant with the collection creation code. So can we eliminate this entirely (I'd love that) or failing that have a single place where the set of these strings are defined so we don't even need to list them in CreateAliasCmd.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org