dsmiley commented on a change in pull request #1303: LUCENE-9114: Improve
ValueSourceScorer's Default Cost Implementation
URL: https://github.com/apache/lucene-solr/pull/1303#discussion_r387662567
##########
File path:
lucene/queries/src/java/org/apache/lucene/queries/function/FunctionValues.java
##########
@@ -41,6 +41,9 @@
// want the Query carrying around big objects
public abstract class FunctionValues {
+ // Default cost for FunctionValues -- ideally should be overriden by
concrete implementations
+ public static final int DEFAULT_COST = 100;
Review comment:
This is fine with me but FWIW I wouldn't even bother defining it. It has no
value set aside like this; I doubt any user code would want to refer to it. If
we want to document what the default cost is, we should say so in cost()'s
javadoc. I know some devs like to make static constants for everything but IMO
it's sometimes wasted ceremony.
----------------------------------------------------------------
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.
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]