mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-30 23:46:28 +00:00 
			
		
		
		
	fix the dump tests
The issue was linked to the fact that the debug implementation of the PhantomData wasn't the same between rust stable and rust nightly. This was causing an issue while snapshsotting the settings and this commit fix it by representing the settings as json which already ignores the PhantomData
This commit is contained in:
		| @@ -0,0 +1,23 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: movies2.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,23 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: spells.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,37 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: products.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": { | ||||
|     "android": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "iphone": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "phone": [ | ||||
|       "android", | ||||
|       "iphone", | ||||
|       "smartphone" | ||||
|     ] | ||||
|   }, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,24 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: movies.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "exactness", | ||||
|     "release_date:asc" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,25 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: movies2.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,25 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: spells.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,39 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: products.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": { | ||||
|     "android": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "iphone": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "phone": [ | ||||
|       "android", | ||||
|       "iphone", | ||||
|       "smartphone" | ||||
|     ] | ||||
|   }, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,31 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: movies.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [ | ||||
|     "genres", | ||||
|     "id" | ||||
|   ], | ||||
|   "sortableAttributes": [ | ||||
|     "release_date" | ||||
|   ], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness", | ||||
|     "release_date:asc" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null | ||||
| } | ||||
| @@ -0,0 +1,34 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: spells.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null, | ||||
|   "typoTolerance": { | ||||
|     "enabled": true, | ||||
|     "minWordSizeForTypos": { | ||||
|       "oneTypo": 5, | ||||
|       "twoTypos": 9 | ||||
|     }, | ||||
|     "disableOnWords": [], | ||||
|     "disableOnAttributes": [] | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,48 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: products.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": { | ||||
|     "android": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "iphone": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "phone": [ | ||||
|       "android", | ||||
|       "iphone", | ||||
|       "smartphone" | ||||
|     ] | ||||
|   }, | ||||
|   "distinctAttribute": null, | ||||
|   "typoTolerance": { | ||||
|     "enabled": true, | ||||
|     "minWordSizeForTypos": { | ||||
|       "oneTypo": 5, | ||||
|       "twoTypos": 9 | ||||
|     }, | ||||
|     "disableOnWords": [], | ||||
|     "disableOnAttributes": [] | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,40 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: movies.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [ | ||||
|     "genres", | ||||
|     "id" | ||||
|   ], | ||||
|   "sortableAttributes": [ | ||||
|     "release_date" | ||||
|   ], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness", | ||||
|     "release_date:asc" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null, | ||||
|   "typoTolerance": { | ||||
|     "enabled": true, | ||||
|     "minWordSizeForTypos": { | ||||
|       "oneTypo": 5, | ||||
|       "twoTypos": 9 | ||||
|     }, | ||||
|     "disableOnWords": [], | ||||
|     "disableOnAttributes": [] | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,40 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: spells.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null, | ||||
|   "typoTolerance": { | ||||
|     "enabled": true, | ||||
|     "minWordSizeForTypos": { | ||||
|       "oneTypo": 5, | ||||
|       "twoTypos": 9 | ||||
|     }, | ||||
|     "disableOnWords": [], | ||||
|     "disableOnAttributes": [] | ||||
|   }, | ||||
|   "faceting": { | ||||
|     "maxValuesPerFacet": 100 | ||||
|   }, | ||||
|   "pagination": { | ||||
|     "maxTotalHits": 1000 | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,54 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: products.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [], | ||||
|   "sortableAttributes": [], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": { | ||||
|     "android": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "iphone": [ | ||||
|       "phone", | ||||
|       "smartphone" | ||||
|     ], | ||||
|     "phone": [ | ||||
|       "android", | ||||
|       "iphone", | ||||
|       "smartphone" | ||||
|     ] | ||||
|   }, | ||||
|   "distinctAttribute": null, | ||||
|   "typoTolerance": { | ||||
|     "enabled": true, | ||||
|     "minWordSizeForTypos": { | ||||
|       "oneTypo": 5, | ||||
|       "twoTypos": 9 | ||||
|     }, | ||||
|     "disableOnWords": [], | ||||
|     "disableOnAttributes": [] | ||||
|   }, | ||||
|   "faceting": { | ||||
|     "maxValuesPerFacet": 100 | ||||
|   }, | ||||
|   "pagination": { | ||||
|     "maxTotalHits": 1000 | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,46 @@ | ||||
| --- | ||||
| source: dump/src/reader/mod.rs | ||||
| expression: movies.settings().unwrap() | ||||
| --- | ||||
| { | ||||
|   "displayedAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "searchableAttributes": [ | ||||
|     "*" | ||||
|   ], | ||||
|   "filterableAttributes": [ | ||||
|     "genres", | ||||
|     "id" | ||||
|   ], | ||||
|   "sortableAttributes": [ | ||||
|     "release_date" | ||||
|   ], | ||||
|   "rankingRules": [ | ||||
|     "words", | ||||
|     "typo", | ||||
|     "proximity", | ||||
|     "attribute", | ||||
|     "sort", | ||||
|     "exactness", | ||||
|     "release_date:asc" | ||||
|   ], | ||||
|   "stopWords": [], | ||||
|   "synonyms": {}, | ||||
|   "distinctAttribute": null, | ||||
|   "typoTolerance": { | ||||
|     "enabled": true, | ||||
|     "minWordSizeForTypos": { | ||||
|       "oneTypo": 5, | ||||
|       "twoTypos": 9 | ||||
|     }, | ||||
|     "disableOnWords": [], | ||||
|     "disableOnAttributes": [] | ||||
|   }, | ||||
|   "faceting": { | ||||
|     "maxValuesPerFacet": 100 | ||||
|   }, | ||||
|   "pagination": { | ||||
|     "maxTotalHits": 1000 | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user