mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Use a nonrandom hasher when decoding NDJSON
This commit is contained in:
parent
69c931334f
commit
93fbdc06d3
3 changed files with 8 additions and 5 deletions
|
@ -26,6 +26,7 @@ memmap2 = "0.9.4"
|
|||
milli = { path = "../milli" }
|
||||
bumparaw-collections = "0.1.2"
|
||||
roaring = { version = "0.10.7", features = ["serde"] }
|
||||
rustc-hash = "2.1.0"
|
||||
serde = { version = "1.0.204", features = ["derive"] }
|
||||
serde-cs = "0.2.4"
|
||||
serde_json = "1.0.120"
|
||||
|
|
|
@ -8,6 +8,7 @@ use bumparaw_collections::RawMap;
|
|||
use memmap2::Mmap;
|
||||
use milli::documents::Error;
|
||||
use milli::Object;
|
||||
use rustc_hash::FxBuildHasher;
|
||||
use serde::de::{SeqAccess, Visitor};
|
||||
use serde::{Deserialize, Deserializer};
|
||||
use serde_json::error::Category;
|
||||
|
@ -263,7 +264,7 @@ pub fn read_ndjson(input: &File) -> Result<u64> {
|
|||
match result {
|
||||
Ok(raw) => {
|
||||
// try to deserialize as a map
|
||||
RawMap::from_raw_value(raw, &bump)
|
||||
RawMap::from_raw_value_and_hasher(raw, FxBuildHasher, &bump)
|
||||
.map_err(|e| DocumentFormatError::from((PayloadType::Ndjson, e)))?;
|
||||
count += 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue