gerlowskija commented on code in PR #4229:
URL: https://github.com/apache/solr/pull/4229#discussion_r2966735285


##########
solr/core/src/java/org/apache/solr/schema/numericrange/AbstractNumericRangeField.java:
##########
@@ -82,9 +83,54 @@ public interface NumericRangeValue {
   protected static final Pattern SINGLE_BOUND_PATTERN =
       Pattern.compile("^" + COMMA_DELIMITED_NUMS + "$");
 
+  /**
+   * Regex fragment matching a comma-separated list of signed floating-point 
numbers (integers or
+   * floating-point literals).
+   */
+  protected static final String COMMA_DELIMITED_FP_NUMS =

Review Comment:
   [0] All of these regexes are a bit messy.
   
   Ultimately the idea here is that we want the validation for each 
implementing type (int, float, etc.) to be specific to what that type looks 
like.  IntRangeField needs to be able to reject fp-values, etc.
   
   This validation is done by regex.  The regexes live in this base class 
because some code here that invotes this verification.  Individual sub-classes 
specify the regex pattern they want to use by using overrideable methods 
`getRangePattern` and `getSingleBoundPattern`.
   
   So that's my rationale here.  Open to other ways of doing it if folks can 
see a better approach....



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to