We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
タイトル(issueならsubject)にキーワードが含まれていた場合は本文に含まれている場合よりも高いスコアーにして欲しい。理由はタイトルに含まれている方がより目的の項目である可能性が高いから。
subject
The text was updated successfully, but these errors were encountered:
カラム毎に重みを変えるには、まず、マルチカラムインデックスをやめる。マルチカラムインデクスではすべてのカラムを同じように扱ってしまうから。
マルチカラムインデックスをやめるには次のようにするとよさそう。
まず、新しくマイグレーションファイルを作る。
次に↑で↓みたいにする。
drop_index(:fts_projects, [:name, :identifier, :description]) add_index(:fts_projects, :name, type: "fulltext") add_index(:fts_projects, :identifier, type: "fulltext") add_index(:fts_projects, :description, type: "fulltext") # ...
lib/full_text_search/mroonga.rbを次のように変える。
lib/full_text_search/mroonga.rb
WHERE MATCH(name, identifier, description)
みたいなのを
WHERE MATCH(name) ... OR MATCH(identifier) ... OR MATCH(description)
みたいにする。
SELECT ..., MATCH(name) ... as score
SELECT ..., MATCH(name) ... * 100 + MATCH(identifier) ... * 100 + MATCH(description) ... as score
Sorry, something went wrong.
813f7a8 で大体できた。 カラムごとのスコアの調整は要検討。
カラムごとのスコアの調整は、具体的な提案があれば検討する。
No branches or pull requests
タイトル(issueなら
subject
)にキーワードが含まれていた場合は本文に含まれている場合よりも高いスコアーにして欲しい。理由はタイトルに含まれている方がより目的の項目である可能性が高いから。The text was updated successfully, but these errors were encountered: