diff options
Diffstat (limited to 'corp/russian/data-import/src/main.rs')
-rw-r--r-- | corp/russian/data-import/src/main.rs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/corp/russian/data-import/src/main.rs b/corp/russian/data-import/src/main.rs index 11387539ab84..18bc0238e7e0 100644 --- a/corp/russian/data-import/src/main.rs +++ b/corp/russian/data-import/src/main.rs @@ -210,12 +210,23 @@ fn open_russian(conn: &Connection, args: &Args) { db_setup::initial_or_schema(conn); - let tx = conn - .unchecked_transaction() - .ensure("failed to start transaction"); + { + let tx = conn + .unchecked_transaction() + .ensure("failed to start transaction"); + + db_setup::insert_or_words(&tx, parser.words()); + tx.commit().ensure("OpenRussian words commit failed"); + } + + { + let tx = conn + .unchecked_transaction() + .ensure("failed to start transaction"); - db_setup::insert_or_words(&tx, parser.words()); - tx.commit().ensure("OpenRussian words commit failed"); + db_setup::insert_or_word_forms(&tx, parser.words_forms()); + tx.commit().ensure("OpenRussian word forms commit failed"); + } info!("finished OpenRussian import"); } |