Skip to content

Commit 37dd38c

Browse files
hdhayneCoveoy-lakhdar
authored andcommitted
fix: bug related to the type expected of delete documents
1 parent f2e93a2 commit 37dd38c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/PushBatchOfDocuments.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import com.coveo.pushapiclient.BatchUpdate;
2+
import com.coveo.pushapiclient.DeleteDocument;
23
import com.coveo.pushapiclient.DocumentBuilder;
34
import com.coveo.pushapiclient.Source;
45

@@ -13,14 +14,14 @@ public static void main(String[] args) {
1314
DocumentBuilder firstDocumentToAdd = new DocumentBuilder("https://my.document.uri?ref=1", "My first document title");
1415
DocumentBuilder secondDocumentToAdd = new DocumentBuilder("https://my.document.uri?ref=2", "My second document title");
1516

16-
DocumentBuilder firstDocumentToDelete = new DocumentBuilder("https://my.document.uri?ref=3", "My document to delete");
17+
DeleteDocument firstDocumentToDelete = new DeleteDocument("https://my.document.uri?ref=3");
1718

1819
ArrayList<DocumentBuilder> listOfDocumentsToAddOrUpdate = new ArrayList<>() {{
1920
add(firstDocumentToAdd);
2021
add(secondDocumentToAdd);
2122
}};
2223

23-
ArrayList<DocumentBuilder> listOfDocumentsToDelete = new ArrayList<>() {{
24+
ArrayList<DeleteDocument> listOfDocumentsToDelete = new ArrayList<>() {{
2425
add(firstDocumentToDelete);
2526
}};
2627

0 commit comments

Comments
 (0)