mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 06:44:27 +01:00
make the project compile again
This commit is contained in:
parent
46b8ebcab4
commit
7879189c6b
@ -124,8 +124,8 @@ impl Index {
|
|||||||
self.settings_txn(&txn)
|
self.settings_txn(&txn)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn name(&self) -> String {
|
pub fn name(&self) -> &str {
|
||||||
self.name
|
&self.name
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn settings_txn(&self, txn: &RoTxn) -> Result<Settings<Checked>> {
|
pub fn settings_txn(&self, txn: &RoTxn) -> Result<Settings<Checked>> {
|
||||||
|
@ -215,7 +215,7 @@ impl IndexScheduler {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let batch = match self.get_next_batch(&wtxn) {
|
let mut batch = match self.get_next_batch(&wtxn) {
|
||||||
Ok(batch) => batch,
|
Ok(batch) => batch,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("{}", e);
|
log::error!("{}", e);
|
||||||
@ -232,7 +232,7 @@ impl IndexScheduler {
|
|||||||
|
|
||||||
fn process_batch(&self, wtxn: &mut RwTxn, batch: &mut Batch) -> Result<()> {
|
fn process_batch(&self, wtxn: &mut RwTxn, batch: &mut Batch) -> Result<()> {
|
||||||
match batch {
|
match batch {
|
||||||
Batch::One(task) => match task.kind {
|
Batch::One(task) => match &task.kind {
|
||||||
KindWithContent::ClearAllDocuments { index_name } => {
|
KindWithContent::ClearAllDocuments { index_name } => {
|
||||||
self.index(&index_name)?.clear_documents()?;
|
self.index(&index_name)?.clear_documents()?;
|
||||||
}
|
}
|
||||||
|
@ -50,22 +50,22 @@ impl IndexScheduler {
|
|||||||
.ok_or(Error::CorruptedTaskQueue)?;
|
.ok_or(Error::CorruptedTaskQueue)?;
|
||||||
|
|
||||||
if old_task.status != task.status {
|
if old_task.status != task.status {
|
||||||
self.update_status(wtxn, old_task.status, |bitmap| {
|
self.update_status(wtxn, old_task.status, |mut bitmap| {
|
||||||
bitmap.remove(task.uid);
|
bitmap.remove(task.uid);
|
||||||
bitmap
|
bitmap
|
||||||
})?;
|
})?;
|
||||||
self.update_status(wtxn, task.status, |bitmap| {
|
self.update_status(wtxn, task.status, |mut bitmap| {
|
||||||
bitmap.insert(task.uid);
|
bitmap.insert(task.uid);
|
||||||
bitmap
|
bitmap
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if old_task.kind.as_kind() != task.kind.as_kind() {
|
if old_task.kind.as_kind() != task.kind.as_kind() {
|
||||||
self.update_kind(wtxn, old_task.kind.as_kind(), |bitmap| {
|
self.update_kind(wtxn, old_task.kind.as_kind(), |mut bitmap| {
|
||||||
bitmap.remove(task.uid);
|
bitmap.remove(task.uid);
|
||||||
bitmap
|
bitmap
|
||||||
})?;
|
})?;
|
||||||
self.update_kind(wtxn, task.kind.as_kind(), |bitmap| {
|
self.update_kind(wtxn, task.kind.as_kind(), |mut bitmap| {
|
||||||
bitmap.insert(task.uid);
|
bitmap.insert(task.uid);
|
||||||
bitmap
|
bitmap
|
||||||
})?;
|
})?;
|
||||||
|
Loading…
Reference in New Issue
Block a user