mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-29 16:45:30 +08:00
WIP
This commit is contained in:
parent
32dec62030
commit
e727cf35fb
@ -5,22 +5,18 @@ use std::io::{self, BufWriter};
|
||||
use std::mem::{self, size_of};
|
||||
|
||||
use bincode::ErrorKind;
|
||||
use bumpalo::Bump;
|
||||
use heed::RoTxn;
|
||||
use raw_collections::bbbul::BitPacker4x;
|
||||
use raw_collections::Bbbul;
|
||||
use uell::Uell;
|
||||
|
||||
use crate::update::new::document::Document;
|
||||
use crate::update::new::indexer::document_changes::{
|
||||
DocumentChangeContext, Extractor, FullySend, MostlySend,
|
||||
};
|
||||
use crate::update::new::indexer::document_changes::{DocumentChangeContext, Extractor, MostlySend};
|
||||
use crate::update::new::ref_cell_ext::RefCellExt as _;
|
||||
use crate::update::new::DocumentChange;
|
||||
use crate::update::GrenadParameters;
|
||||
use crate::{
|
||||
CboRoaringBitmapCodec, DocumentId, Error, FieldId, GeoPoint, GlobalFieldsIdsMap, Index,
|
||||
InternalError, Result,
|
||||
};
|
||||
use crate::{DocumentId, Index, Result};
|
||||
|
||||
pub struct GeoExtractor {
|
||||
grenad_parameters: GrenadParameters,
|
||||
@ -36,7 +32,6 @@ impl GeoExtractor {
|
||||
let is_sortable = index.sortable_fields(rtxn)?.contains("_geo");
|
||||
let is_filterable = index.filterable_fields(rtxn)?.contains("_geo");
|
||||
if is_sortable || is_filterable {
|
||||
// Ok(Some(GeoExtractor { rtree: index.geo_rtree(rtxn)? }))
|
||||
Ok(Some(GeoExtractor { grenad_parameters }))
|
||||
} else {
|
||||
Ok(None)
|
||||
@ -61,14 +56,12 @@ unsafe impl MostlySend for GeoExtractorData<'_> {}
|
||||
impl<'extractor> Extractor<'extractor> for GeoExtractor {
|
||||
type Data = RefCell<GeoExtractorData<'extractor>>;
|
||||
|
||||
fn init_data<'doc>(
|
||||
&'doc self,
|
||||
extractor_alloc: &'extractor bumpalo::Bump,
|
||||
) -> Result<Self::Data> {
|
||||
fn init_data<'doc>(&'doc self, extractor_alloc: &'extractor Bump) -> Result<Self::Data> {
|
||||
Ok(RefCell::new(GeoExtractorData {
|
||||
inserted: Uell::new_in(extractor_alloc),
|
||||
removed: Bbbul::new_in(extractor_alloc),
|
||||
spilled: None,
|
||||
spilled_removed: None,
|
||||
spilled_inserted: None,
|
||||
}))
|
||||
}
|
||||
|
||||
@ -91,7 +84,7 @@ impl<'extractor> Extractor<'extractor> for GeoExtractor {
|
||||
let updated_geo = update.updated().geo_field()?;
|
||||
// ...
|
||||
}
|
||||
DocumentChange::Insertion(insertion) => todo!(),
|
||||
DocumentChange::Insertion(insertion) => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user