@@ -551,6 +551,14 @@ public function testSearchIndex(): void
551551 self ::assertSame ('search ' , $ index ['type ' ]);
552552 self ::assertFalse ($ index ['latestDefinition ' ]['mappings ' ]['dynamic ' ]);
553553 self ::assertSame ('lucene.whitespace ' , $ index ['latestDefinition ' ]['mappings ' ]['fields ' ]['foo ' ]['analyzer ' ]);
554+
555+ // Drop the index using default name
556+ Schema::table ('newcollection ' , function (Blueprint $ collection ) {
557+ $ collection ->dropSearchIndex ();
558+ });
559+
560+ $ index = $ this ->getSearchIndex ('newcollection ' , 'default ' );
561+ self ::assertNull ($ index );
554562 }
555563
556564 public function testVectorSearchIndex ()
@@ -571,6 +579,14 @@ public function testVectorSearchIndex()
571579 self ::assertSame ('vector ' , $ index ['name ' ]);
572580 self ::assertSame ('vectorSearch ' , $ index ['type ' ]);
573581 self ::assertSame ('vector ' , $ index ['latestDefinition ' ]['fields ' ][0 ]['type ' ]);
582+
583+ // Drop the index
584+ Schema::table ('newcollection ' , function (Blueprint $ collection ) {
585+ $ collection ->dropSearchIndex ('vector ' );
586+ });
587+
588+ $ index = $ this ->getSearchIndex ('newcollection ' , 'vector ' );
589+ self ::assertNull ($ index );
574590 }
575591
576592 protected function getIndex (string $ collection , string $ name )
0 commit comments