gaobinlong commented on code in PR #16247:
URL: https://github.com/apache/lucene/pull/16247#discussion_r3471738847


##########
lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGroupingSearch.java:
##########
@@ -110,10 +110,17 @@ public void testBasic() throws Exception {
     // 6 -- no author field
     doc = new Document();
     doc.add(new TextField("content", "random word stuck in alot of other 
text", Field.Store.YES));
-    doc.add(new Field("id", "6", customType));
-    doc.add(new StringField("groupend", "x", Field.Store.NO));
+    doc.add(new Field("id", "7", customType));
+    documents.add(doc);
 
-    w.addDocument(doc);
+    // 7 -- no match document
+    doc = new Document();
+    doc.add(new TextField("content", "no-match", Field.Store.YES));
+    doc.add(new Field("id", "8", customType));
+    doc.add(new StringField("groupend", "x", Field.Store.NO));
+    documents.add(doc);
+    w.addDocuments(documents);
+    documents.clear();

Review Comment:
   The id field starts from 1, so the comment is not consistent with the id 
number, changed it to starts from 0. At a second thought, add the extra 
document is not necessary, so removed it.



-- 
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