mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
fix add primary key on index creation
This commit is contained in:
parent
271c8ba991
commit
7d9637861f
@ -486,6 +486,11 @@ impl IndexStore for HeedIndexStore {
|
|||||||
|
|
||||||
let index = spawn_blocking(move || -> Result<Index> {
|
let index = spawn_blocking(move || -> Result<Index> {
|
||||||
let index = open_index(&path, 4096 * 100_000)?;
|
let index = open_index(&path, 4096 * 100_000)?;
|
||||||
|
if let Some(primary_key) = primary_key {
|
||||||
|
let mut txn = index.write_txn()?;
|
||||||
|
index.put_primary_key(&mut txn, &primary_key)?;
|
||||||
|
txn.commit()?;
|
||||||
|
}
|
||||||
Ok(index)
|
Ok(index)
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
|
Loading…
Reference in New Issue
Block a user