mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2025-12-25 19:49:57 +00:00
compact doc (#2402)
* compact doc * add any value type * pass references when building CompactDoc * remove OwnedValue from API * clippy * clippy * fail on large documents * fmt * cleanup * cleanup * implement Value for different types fix serde_json date Value implementation * fmt * cleanup * fmt * cleanup * store positions instead of pos+len * remove nodes array * remove mediumvec * cleanup * infallible serialize into vec * remove positions indirection * remove 24MB limitation in document use u32 for Addr Remove the 3 byte addressing limitation and use VInt instead * cleanup * extend test * cleanup, add comments * rename, remove pub
This commit is contained in:
@@ -172,7 +172,9 @@ pub use self::de::{
|
||||
ArrayAccess, DeserializeError, DocumentDeserialize, DocumentDeserializer, ObjectAccess,
|
||||
ValueDeserialize, ValueDeserializer, ValueType, ValueVisitor,
|
||||
};
|
||||
pub use self::default_document::{DocParsingError, TantivyDocument};
|
||||
pub use self::default_document::{
|
||||
CompactDocArrayIter, CompactDocObjectIter, CompactDocValue, DocParsingError, TantivyDocument,
|
||||
};
|
||||
pub use self::owned_value::OwnedValue;
|
||||
pub(crate) use self::se::BinaryDocumentSerializer;
|
||||
pub use self::value::{ReferenceValue, ReferenceValueLeaf, Value};
|
||||
@@ -233,7 +235,7 @@ pub trait Document: Send + Sync + 'static {
|
||||
let field_name = schema.get_field_name(field);
|
||||
let values: Vec<OwnedValue> = field_values
|
||||
.into_iter()
|
||||
.map(|val| val.as_value().into())
|
||||
.map(|val| OwnedValue::from(val.as_value()))
|
||||
.collect();
|
||||
field_map.insert(field_name.to_string(), values);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user