gus-asf commented on a change in pull request #583: SOLR-13151
URL: https://github.com/apache/lucene-solr/pull/583#discussion_r258969229
 
 

 ##########
 File path: 
solr/core/src/java/org/apache/solr/cloud/api/collections/CategoryRoutedAlias.java
 ##########
 @@ -119,13 +119,19 @@ public void validateRouteValue(AddUpdateCommand cmd) 
throws SolrException {
     }
 
     String dataValue = 
String.valueOf(cmd.getSolrInputDocument().getFieldValue(getRouteField()));
+    String mustMatch = aliasMetadata.get(ROUTER_MUST_MATCH);
     String candidateCollectionName = buildCollectionNameFromValue(dataValue);
     List<String> cols = getCollectionList(this.parsedAliases);
 
     if (cols.contains(candidateCollectionName)) {
       return;
     }
 
+    if (mustMatch != null && !candidateCollectionName.matches(mustMatch)) {
 
 Review comment:
   We should use a pre-compiled expression. When the CRA is created this 
expression should be precompiled and stored as a field. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to