Navigation Menu

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

Change how to calculate score of fuzzy_search #470

Merged
merged 2 commits into from Feb 8, 2016

Conversation

naoa
Copy link
Member

@naoa naoa commented Feb 6, 2016

[groonga-dev,03916]

2.編集距離に応じてトークンの重み付けをする。
の方の実装です。

編集距離を他のマッチスコアとなじませるためにmax_distance - edit_distance + 1としてみました。
同じ文字列(編集距離が0)がmax_distance + 1になります。
遠くなるほどスコアが下がり、最も遠いのが1です。

よければ、ご検討ください。

もし、1.の方が望ましければ閉じてください。

daijiro added a commit that referenced this pull request Feb 8, 2016
Change how to calculate score of fuzzy_search
@daijiro daijiro merged commit faaa0a0 into groonga:master Feb 8, 2016
@naoa
Copy link
Member Author

naoa commented Feb 8, 2016

すいません。これ正しくないですね。。
heapなので最小値いかんによってはweightを設定しているカーソルがまちがいます。
後で直したものをPRします。

@daijiro
Copy link
Member

daijiro commented Feb 8, 2016

おお。。

@naoa
Copy link
Member Author

naoa commented Feb 8, 2016

うーん、よく考えるとpostingのweightを使う方法だと、全レコードのpostingにweightを入れていかなくてはいけなくてちょっと現実的ではありませんね。。

やるとするとposting単位ではなくトークン単位で重みを設定、適用できる仕組みが必要そうです。
もう少し考えて、リーズナブルに通常の検索に影響がなく実装できる方法が思いつかなかったら、いったん、重みの設定なしに戻したいと考えています。

@naoa naoa deleted the fuzzy-fix-score branch February 16, 2016 01:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants