dsmiley commented on code in PR #4279:
URL: https://github.com/apache/solr/pull/4279#discussion_r3068929321
##########
solr/core/src/java/org/apache/solr/handler/admin/api/UpgradeCoreIndex.java:
##########
@@ -149,11 +149,11 @@ private UpgradeCoreIndexResponse performUpgradeImpl(
RefCounted<SolrIndexSearcher> searcherRef = core.getSearcher();
try {
- // Check for nested documents before processing - we don't support them
- if (indexContainsNestedDocs(searcherRef.get())) {
+ // Check for child documents before processing - we don't support them
+ if (indexContainsChildDocs(searcherRef.get())) {
throw new SolrException(
BAD_REQUEST,
- "UPGRADECOREINDEX does not support indexes containing nested
documents. "
+ "UPGRADECOREINDEX does not support indexes containing child
documents. "
Review Comment:
```suggestion
"UPGRADECOREINDEX does not support indexes containing
child/nested documents. "
```
Even though nested docs *is* child docs... "nested" should nonetheless be
most common.
##########
solr/core/src/test/org/apache/solr/handler/admin/UpgradeCoreIndexActionTest.java:
##########
@@ -365,10 +365,192 @@ public void
testUpgradeCoreIndexFailsWithNestedDocuments() throws Exception {
coreName),
resp));
- // Verify the exception message indicates nested documents are not
supported
+ // Verify the exception message indicates child documents are not
supported
assertThat(
thrown.getMessage(),
- containsString("does not support indexes containing nested
documents"));
+ containsString("does not support indexes containing child
documents"));
+ } finally {
+ admin.shutdown();
+ admin.close();
+ }
+ }
+
+ // --- Child docs detection tests ---
Review Comment:
[0] Wow lots of tests... and they seem only slightly tweaked amongst each.
My observation is that Lucene/Solr old-timers (like me) prefer to write a
minimal number of randomized test instead of writing many repeated tests that
tweak something. I noticed LLMs prefer the latter. But it's fine, really!
--
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]