mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 01:57:41 +08:00
Fixup imports
This commit is contained in:
parent
aff8ca4397
commit
9fe5122176
@ -171,12 +171,12 @@ mod test {
|
||||
use bumpalo::Bump;
|
||||
use charabia::TokenizerBuilder;
|
||||
use meili_snap::snapshot;
|
||||
|
||||
use raw_collections::RawMap;
|
||||
use serde_json::json;
|
||||
use serde_json::value::RawValue;
|
||||
|
||||
use super::*;
|
||||
use crate::update::new::document::{DocumentFromVersions, Versions};
|
||||
use crate::FieldsIdsMap;
|
||||
|
||||
#[test]
|
||||
@ -222,7 +222,8 @@ mod test {
|
||||
let bump = Bump::new();
|
||||
let document: &RawValue = serde_json::from_str(&document).unwrap();
|
||||
let document = RawMap::from_raw_value(document, &bump).unwrap();
|
||||
let document = document.into_bump_slice();
|
||||
|
||||
let document = DocumentFromVersions::new(Versions::single(document));
|
||||
|
||||
document_tokenizer
|
||||
.tokenize_document(
|
||||
|
@ -1,15 +1,12 @@
|
||||
use std::ops::DerefMut;
|
||||
|
||||
use rayon::iter::IndexedParallelIterator;
|
||||
use serde::Deserializer;
|
||||
use serde_json::value::RawValue;
|
||||
|
||||
use super::de::FieldAndDocidExtractor;
|
||||
use super::document_changes::{DocumentChangeContext, DocumentChanges, MostlySend, RefCellExt};
|
||||
use crate::documents::{DocumentIdExtractionError, PrimaryKey};
|
||||
use crate::documents::PrimaryKey;
|
||||
use crate::update::concurrent_available_ids::ConcurrentAvailableIds;
|
||||
use crate::update::new::document::DocumentFromVersions;
|
||||
use crate::update::new::document_change::Versions;
|
||||
use crate::update::new::document::{DocumentFromVersions, Versions};
|
||||
use crate::update::new::{DocumentChange, Insertion};
|
||||
use crate::{Error, InternalError, Result, UserError};
|
||||
|
||||
@ -79,8 +76,7 @@ where
|
||||
let document = raw_collections::RawMap::from_raw_value(document, doc_alloc)
|
||||
.map_err(InternalError::SerdeJson)?;
|
||||
|
||||
let document = document.into_bump_slice();
|
||||
let document = DocumentFromVersions::new(Versions::Single(document));
|
||||
let document = DocumentFromVersions::new(Versions::single(document));
|
||||
|
||||
let insertion = Insertion::create(docid, external_document_id, document);
|
||||
Ok(Some(DocumentChange::Insertion(insertion)))
|
||||
|
@ -9,8 +9,7 @@ use super::DocumentChanges;
|
||||
use crate::documents::Error::InvalidDocumentFormat;
|
||||
use crate::documents::PrimaryKey;
|
||||
use crate::error::{FieldIdMapMissingEntry, InternalError};
|
||||
use crate::update::new::document::DocumentFromVersions;
|
||||
use crate::update::new::document_change::Versions;
|
||||
use crate::update::new::document::{DocumentFromVersions, Versions};
|
||||
use crate::update::new::{Deletion, DocumentChange, KvReaderFieldId, Update};
|
||||
use crate::{all_obkv_to_json, Error, FieldsIdsMap, Object, Result, UserError};
|
||||
|
||||
@ -161,9 +160,8 @@ impl<'index> DocumentChanges<'index> for UpdateByFunctionChanges<'index> {
|
||||
} else {
|
||||
let raw_new_doc = RawMap::from_raw_value(raw_new_doc, doc_alloc)
|
||||
.map_err(InternalError::SerdeJson)?;
|
||||
let new_doc_version = DocumentFromVersions::new(Versions::Single(
|
||||
raw_new_doc.into_bump_slice(),
|
||||
));
|
||||
let new_doc_version =
|
||||
DocumentFromVersions::new(Versions::single(raw_new_doc));
|
||||
Ok(Some(DocumentChange::Update(Update::create(
|
||||
docid,
|
||||
new_document_id,
|
||||
|
Loading…
Reference in New Issue
Block a user