mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Add index name to unsortable columns error message
This commit is contained in:
parent
d00c187349
commit
b1bc505807
14 changed files with 19 additions and 19 deletions
|
@ -103,7 +103,7 @@ impl ReopenableIndex {
|
|||
return Ok(());
|
||||
}
|
||||
map.unavailable.remove(&self.uuid);
|
||||
map.create("", &self.uuid, path, None, self.enable_mdb_writemap, self.map_size)?;
|
||||
map.create(None, &self.uuid, path, None, self.enable_mdb_writemap, self.map_size)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ impl IndexMap {
|
|||
///
|
||||
pub fn create(
|
||||
&mut self,
|
||||
name: &str,
|
||||
name: Option<String>,
|
||||
uuid: &Uuid,
|
||||
path: &Path,
|
||||
date: Option<(OffsetDateTime, OffsetDateTime)>,
|
||||
|
@ -297,7 +297,7 @@ impl IndexMap {
|
|||
/// Create or open an index in the specified path.
|
||||
/// The path *must* exist or an error will be thrown.
|
||||
fn create_or_open_index(
|
||||
name: &str,
|
||||
name: Option<String>,
|
||||
path: &Path,
|
||||
date: Option<(OffsetDateTime, OffsetDateTime)>,
|
||||
enable_mdb_writemap: bool,
|
||||
|
@ -312,14 +312,14 @@ fn create_or_open_index(
|
|||
|
||||
if let Some((created, updated)) = date {
|
||||
Ok(Index::new_with_creation_dates(
|
||||
Some(String::from(name)),
|
||||
name,
|
||||
options,
|
||||
path,
|
||||
created,
|
||||
updated,
|
||||
)?)
|
||||
} else {
|
||||
Ok(Index::new(Some(String::from(name)), options, path)?)
|
||||
Ok(Index::new(name, options, path)?)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ impl IndexMapper {
|
|||
// This is very unlikely to happen in practice.
|
||||
// TODO: it would be better to lazily create the index. But we need an Index::open function for milli.
|
||||
let index = self.index_map.write().unwrap().create(
|
||||
&name,
|
||||
Some(name.to_string()),
|
||||
&uuid,
|
||||
&index_path,
|
||||
date,
|
||||
|
@ -372,7 +372,7 @@ impl IndexMapper {
|
|||
let index_path = self.base_path.join(uuid.to_string());
|
||||
|
||||
break index_map.create(
|
||||
name,
|
||||
Some(name.to_string()),
|
||||
&uuid,
|
||||
&index_path,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue