mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01: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 = 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)
|
||||
})
|
||||
.await
|
||||
|
Loading…
x
Reference in New Issue
Block a user