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