dsmiley commented on code in PR #3380:
URL: https://github.com/apache/solr/pull/3380#discussion_r2127571321
##########
solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java:
##########
@@ -38,14 +40,23 @@
* @since solr 4.0
*/
public class ValueSourceAugmenter extends DocTransformer {
+
public final String name;
public final QParser qparser;
public final ValueSource valueSource;
+ private static final Object NULL_SENTINEL = new Object();
Review Comment:
statics should be defined above
##########
solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java:
##########
@@ -38,14 +40,23 @@
* @since solr 4.0
*/
public class ValueSourceAugmenter extends DocTransformer {
+
public final String name;
public final QParser qparser;
public final ValueSource valueSource;
+ private static final Object NULL_SENTINEL = new Object();
+ private static final int MAX_PREFETCH_DEFAULT = 1000;
+ private final int maxPrefetchSize;
public ValueSourceAugmenter(String name, QParser qparser, ValueSource
valueSource) {
this.name = name;
this.qparser = qparser;
this.valueSource = valueSource;
+ var localParams = qparser.getLocalParams();
+ maxPrefetchSize =
+ localParams != null
+ ? localParams.getInt("preFetchDocs", MAX_PREFETCH_DEFAULT)
+ : MAX_PREFETCH_DEFAULT;
Review Comment:
oh I recall qparser.getParam(str) now, so you don't have to do the null
check and it'll look in the top level request. It doesn't have the integer
parse but you could use `"1000"` (as a literal; no constant needed!)
--
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]