mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 16:06:31 +00:00 
			
		
		
		
	Fix behavior when removing a document
This commit is contained in:
		| @@ -64,6 +64,13 @@ impl<'t, 'i> ClearDocuments<'t, 'i> { | |||||||
|         self.index.delete_geo_rtree(self.wtxn)?; |         self.index.delete_geo_rtree(self.wtxn)?; | ||||||
|         self.index.delete_geo_faceted_documents_ids(self.wtxn)?; |         self.index.delete_geo_faceted_documents_ids(self.wtxn)?; | ||||||
|  |  | ||||||
|  |         // Remove all user-provided bits from the configs | ||||||
|  |         let mut configs = self.index.embedding_configs(self.wtxn)?; | ||||||
|  |         for config in configs.iter_mut() { | ||||||
|  |             config.user_provided.clear(); | ||||||
|  |         } | ||||||
|  |         self.index.put_embedding_configs(self.wtxn, configs)?; | ||||||
|  |  | ||||||
|         // Clear the other databases. |         // Clear the other databases. | ||||||
|         external_documents_ids.clear(self.wtxn)?; |         external_documents_ids.clear(self.wtxn)?; | ||||||
|         word_docids.clear(self.wtxn)?; |         word_docids.clear(self.wtxn)?; | ||||||
|   | |||||||
| @@ -225,6 +225,7 @@ pub fn extract_vector_points<R: io::Read + io::Seek>( | |||||||
|                     } else if document_is_kept && old.is_none() { |                     } else if document_is_kept && old.is_none() { | ||||||
|                         VectorStateDelta::NoChange |                         VectorStateDelta::NoChange | ||||||
|                     } else { |                     } else { | ||||||
|  |                         remove_from_user_provided.insert(docid); | ||||||
|                         VectorStateDelta::NowRemoved |                         VectorStateDelta::NowRemoved | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user