Skip to content

Commit

Permalink
0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
victorteokw committed Feb 7, 2024
1 parent 49822b9 commit b701cfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "teocloud_teo_docs_search_engine"
version = "0.0.3"
version = "0.0.4"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@teocloud/teo-docs-search-engine",
"version": "0.0.3",
"version": "0.0.4",
"main": "index.js",
"types": "index.d.ts",
"napi": {
Expand Down
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ static SCHEMA: Lazy<Schema> = Lazy::new(|| {
static INDEX: Lazy<Index> = Lazy::new(|| {
let path = current_dir().unwrap();
let tmp_dir = path.join(".fulltextcache");
if !tmp_dir.exists() {
fs::create_dir(&tmp_dir).unwrap();
if tmp_dir.exists() {
fs::remove_dir(&tmp_dir).unwrap();
}
fs::create_dir(&tmp_dir).unwrap();
let index = Index::create_in_dir(&tmp_dir, SCHEMA.clone()).unwrap();
index
});
Expand Down

0 comments on commit b701cfa

Please sign in to comment.