mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 04:36:32 +00:00
fmt
This commit is contained in:
@ -522,7 +522,7 @@ where
|
||||
.is_some_and(|conf| conf.is_quantized);
|
||||
let is_quantizing = embedder_config.is_some_and(|action| action.is_being_quantized);
|
||||
|
||||
pool.install(|| -> Result<()> {
|
||||
pool.install(|| -> Result<()> {
|
||||
let mut writer = ArroyWrapper::new(vector_arroy, embedder_index, was_quantized);
|
||||
writer.build_and_quantize(
|
||||
wtxn,
|
||||
|
@ -1150,15 +1150,11 @@ impl GeoSender<'_, '_> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct GeoJsonSender<'a, 'b>(&'a ExtractorBbqueueSender<'b>);
|
||||
|
||||
impl GeoJsonSender<'_, '_> {
|
||||
pub fn send_geojson(&self, docid: DocumentId, value: GeoJson) -> StdResult<(), SendError<()>> {
|
||||
self.0
|
||||
.sender
|
||||
.send(ReceiverAction::GeoJson(docid, value))
|
||||
.map_err(|_| SendError(()))
|
||||
self.0.sender.send(ReceiverAction::GeoJson(docid, value)).map_err(|_| SendError(()))
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,8 @@ pub struct FrozenGeoJsonExtractorData<'extractor> {
|
||||
impl FrozenGeoJsonExtractorData<'_> {
|
||||
pub fn iter_and_clear_removed(
|
||||
&mut self,
|
||||
) -> io::Result<impl IntoIterator<Item = Result<(DocumentId, GeoJson), serde_json::Error>> + '_> {
|
||||
) -> io::Result<impl IntoIterator<Item = Result<(DocumentId, GeoJson), serde_json::Error>> + '_>
|
||||
{
|
||||
Ok(mem::take(&mut self.removed)
|
||||
.iter()
|
||||
.cloned()
|
||||
@ -109,7 +110,8 @@ impl FrozenGeoJsonExtractorData<'_> {
|
||||
|
||||
pub fn iter_and_clear_inserted(
|
||||
&mut self,
|
||||
) -> io::Result<impl IntoIterator<Item = Result<(DocumentId, GeoJson), serde_json::Error>> + '_> {
|
||||
) -> io::Result<impl IntoIterator<Item = Result<(DocumentId, GeoJson), serde_json::Error>> + '_>
|
||||
{
|
||||
Ok(mem::take(&mut self.inserted)
|
||||
.iter()
|
||||
.cloned()
|
||||
@ -215,9 +217,10 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor {
|
||||
file.write_all(geojson.get().as_bytes())?;
|
||||
}
|
||||
// TODO: Should be an internal error
|
||||
None => data_ref.removed.push(
|
||||
(docid, GeoJson::from_str(geojson.get()).map_err(UserError::from)?),
|
||||
),
|
||||
None => data_ref.removed.push((
|
||||
docid,
|
||||
GeoJson::from_str(geojson.get()).map_err(UserError::from)?,
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,9 +231,10 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor {
|
||||
file.write_all(geojson.get().as_bytes())?;
|
||||
}
|
||||
// TODO: Is the error type correct here? Shouldn't it be an internal error?
|
||||
None => data_ref.inserted.push(
|
||||
(docid, GeoJson::from_str(geojson.get()).map_err(UserError::from)?),
|
||||
),
|
||||
None => data_ref.inserted.push((
|
||||
docid,
|
||||
GeoJson::from_str(geojson.get()).map_err(UserError::from)?,
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,9 +252,10 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor {
|
||||
file.write_all(geojson.get().as_bytes())?;
|
||||
}
|
||||
// TODO: Is the error type correct here? Shouldn't it be an internal error?
|
||||
None => data_ref.inserted.push(
|
||||
(docid, GeoJson::from_str(geojson.get()).map_err(UserError::from)?),
|
||||
),
|
||||
None => data_ref.inserted.push((
|
||||
docid,
|
||||
GeoJson::from_str(geojson.get()).map_err(UserError::from)?,
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -320,9 +320,9 @@ where
|
||||
)?;
|
||||
}
|
||||
|
||||
|
||||
'cellulite: {
|
||||
let Some(extractor) = GeoJsonExtractor::new(&rtxn, index, *indexing_context.grenad_parameters)?
|
||||
let Some(extractor) =
|
||||
GeoJsonExtractor::new(&rtxn, index, *indexing_context.grenad_parameters)?
|
||||
else {
|
||||
break 'cellulite;
|
||||
};
|
||||
|
@ -63,7 +63,6 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
#[tracing::instrument(level = "trace", skip_all, target = "indexing::merge")]
|
||||
pub fn merge_and_send_cellulite<'extractor, MSP>(
|
||||
datastore: impl IntoIterator<Item = RefCell<GeoJsonExtractorData<'extractor>>>,
|
||||
|
Reference in New Issue
Block a user