Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

全文検索の導入 #9

Closed
KeenS opened this issue Feb 23, 2021 · 5 comments
Closed

全文検索の導入 #9

KeenS opened this issue Feb 23, 2021 · 5 comments

Comments

@KeenS
Copy link
Owner

KeenS commented Feb 23, 2021

wasmで動く全文検索エンジンがあるので導入したい

stork

stork-search.net/
ひとまず試してみた。

https://github.com/KeenS/KeenS.github.io/tree/fulltext-search-stork

結論からいうとダメ。インデックスが200MBあってロードがめちゃくちゃ重い。

$ du -h static/federalist.st
199M    static/federalist.st

tinysearch

A Tiny, Static, Full-Text Search Engine using Rust and WebAssembly | Matthias Endler

bloom filterベースっぽいのでfalse positiveが起きそうだけど一旦試してみる。

@KeenS
Copy link
Owner Author

KeenS commented Feb 23, 2021

tinysearchはよさそう。

$ du -h tinysearch*
4.0K    tinysearch_engine.d.ts
8.0K    tinysearch_engine.js
268K    tinysearch_engine_bg.wasm
4.0K    tinysearch_engine_bg.wasm.d.ts

@KeenS
Copy link
Owner Author

KeenS commented Feb 23, 2021

tinysearhにはバグがある
tinysearch/tinysearch#111

あと日本語の検索結果がかなり怪しい。キーワードが入ってないページが数件表示されるだけでキーワードが入ってるページが表示されない

@KeenS
Copy link
Owner Author

KeenS commented Feb 23, 2021

@KeenS
Copy link
Owner Author

KeenS commented Feb 23, 2021

そもそもブログの内容をまとめると3.5MBくらいあって毎回ブラウザにロードするには重いのでアプローチとしてはtinysearchの路線が正解?

@KeenS
Copy link
Owner Author

KeenS commented Feb 23, 2021

done in 1c80d78

@KeenS KeenS closed this as completed Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant