mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-30 23:46:28 +00:00 
			
		
		
		
	Add currently failing test
This commit is contained in:
		| @@ -3308,6 +3308,44 @@ mod tests { | ||||
|         rtxn.commit().unwrap(); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|     fn incremental_update_without_changing_facet_distribution() { | ||||
|         let index = TempIndex::new(); | ||||
|         index | ||||
|             .add_documents(documents!([ | ||||
|                 {"id": 0, "some_field": "aaa", "other_field": "aaa" }, | ||||
|                 {"id": 1, "some_field": "bbb", "other_field": "bbb" }, | ||||
|             ])) | ||||
|             .unwrap(); | ||||
|         { | ||||
|             let rtxn = index.read_txn().unwrap(); | ||||
|             // count field distribution | ||||
|             let results = index.field_distribution(&rtxn).unwrap(); | ||||
|             assert_eq!(Some(&2), results.get("id")); | ||||
|             assert_eq!(Some(&2), results.get("some_field")); | ||||
|             assert_eq!(Some(&2), results.get("other_field")); | ||||
|         } | ||||
|  | ||||
|         let mut index = index; | ||||
|         index.index_documents_config.update_method = IndexDocumentsMethod::UpdateDocuments; | ||||
|  | ||||
|         index | ||||
|             .add_documents(documents!([ | ||||
|                 {"id": 0, "other_field": "bbb" }, | ||||
|                 {"id": 1, "some_field": "ccc" }, | ||||
|             ])) | ||||
|             .unwrap(); | ||||
|  | ||||
|         { | ||||
|             let rtxn = index.read_txn().unwrap(); | ||||
|             // count field distribution | ||||
|             let results = index.field_distribution(&rtxn).unwrap(); | ||||
|             assert_eq!(Some(&2), results.get("id")); | ||||
|             assert_eq!(Some(&2), results.get("some_field")); | ||||
|             assert_eq!(Some(&2), results.get("other_field")); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|     fn delete_words_exact_attributes() { | ||||
|         let index = TempIndex::new(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user