@@ -539,6 +539,14 @@ public function testSearchIndex(): void
539539 self ::assertSame ('search ' , $ index ['type ' ]);
540540 self ::assertFalse ($ index ['latestDefinition ' ]['mappings ' ]['dynamic ' ]);
541541 self ::assertSame ('lucene.whitespace ' , $ index ['latestDefinition ' ]['mappings ' ]['fields ' ]['foo ' ]['analyzer ' ]);
542+
543+ // Drop the index using default name
544+ Schema::table ('newcollection ' , function (Blueprint $ collection ) {
545+ $ collection ->dropSearchIndex ();
546+ });
547+
548+ $ index = $ this ->getSearchIndex ('newcollection ' , 'default ' );
549+ self ::assertNull ($ index );
542550 }
543551
544552 public function testVectorSearchIndex ()
@@ -559,6 +567,14 @@ public function testVectorSearchIndex()
559567 self ::assertSame ('vector ' , $ index ['name ' ]);
560568 self ::assertSame ('vectorSearch ' , $ index ['type ' ]);
561569 self ::assertSame ('vector ' , $ index ['latestDefinition ' ]['fields ' ][0 ]['type ' ]);
570+
571+ // Drop the index
572+ Schema::table ('newcollection ' , function (Blueprint $ collection ) {
573+ $ collection ->dropSearchIndex ('vector ' );
574+ });
575+
576+ $ index = $ this ->getSearchIndex ('newcollection ' , 'vector ' );
577+ self ::assertNull ($ index );
562578 }
563579
564580 protected function assertIndexExists (string $ collection , string $ name ): IndexInfo
0 commit comments