1515import org .typesense .api .exceptions .ObjectNotFound ;
1616import org .typesense .model .CollectionSchema ;
1717import org .typesense .model .DeleteDocumentsParameters ;
18+ import org .typesense .model .DirtyValues ;
1819import org .typesense .model .ExportDocumentsParameters ;
1920import org .typesense .model .Field ;
2021import org .typesense .model .ImportDocumentsParameters ;
22+ import org .typesense .model .IndexAction ;
2123import org .typesense .model .SearchParameters ;
2224import org .typesense .model .SearchResult ;
2325import org .typesense .model .UpdateDocumentsParameters ;
24- import org .typesense .model .ImportDocumentsParameters .ActionEnum ;
2526
2627class DocumentsTest {
2728
@@ -183,7 +184,7 @@ void testImport() throws Exception {
183184
184185 documentList .add (document1 );
185186 documentList .add (document2 );
186- queryParameters .action (ImportDocumentsParameters . ActionEnum .CREATE );
187+ queryParameters .action (IndexAction .CREATE );
187188
188189 String countriesImport = this .client .collections ("books" ).documents ()
189190 .import_ (documentList , queryParameters );
@@ -193,7 +194,7 @@ void testImport() throws Exception {
193194 @ Test
194195 void testImportAsString () throws Exception {
195196 ImportDocumentsParameters queryParameters = new ImportDocumentsParameters ();
196- queryParameters .action (ImportDocumentsParameters . ActionEnum .CREATE );
197+ queryParameters .action (IndexAction .CREATE );
197198 String documentList = "{\" countryName\" : \" India\" , \" capital\" : \" Washington\" , \" gdp\" : 5215}\n " +
198199 "{\" countryName\" : \" Iran\" , \" capital\" : \" London\" , \" gdp\" : 5215}" ;
199200 String booksImport = this .client .collections ("books" ).documents ().import_ (documentList ,
@@ -216,8 +217,8 @@ void testDirtyCreate() throws Exception {
216217 helper .createTestDocument ();
217218
218219 ImportDocumentsParameters queryParameters = new ImportDocumentsParameters ();
219- queryParameters .dirtyValues (ImportDocumentsParameters . DirtyValuesEnum .COERCE_OR_REJECT );
220- queryParameters .action (ImportDocumentsParameters . ActionEnum .UPSERT );
220+ queryParameters .dirtyValues (DirtyValues .COERCE_OR_REJECT );
221+ queryParameters .action (IndexAction .UPSERT );
221222
222223 String [] authors = { "shakspeare" , "william" };
223224 HashMap <String , Object > hmap = new HashMap <>();
@@ -247,7 +248,7 @@ void testNestedObjectImport() throws Exception {
247248 client .collections ().create (collectionSchema );
248249
249250 ImportDocumentsParameters queryParameters = new ImportDocumentsParameters ();
250- queryParameters .action (ImportDocumentsParameters . ActionEnum .CREATE );
251+ queryParameters .action (IndexAction .CREATE );
251252
252253 List <NestedDocument > docs = new ArrayList <>();
253254 NestedDocument doc = new NestedDocument ("LA" , "CA" , "USA" )
0 commit comments