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

[Feature] Weighted/Prioritised search fields #13

Open
zeevallin opened this issue Apr 25, 2013 · 0 comments
Open

[Feature] Weighted/Prioritised search fields #13

zeevallin opened this issue Apr 25, 2013 · 0 comments

Comments

@zeevallin
Copy link

This is only conceptual, I don't know how this would be executed, but I want to share this idea anyway. In my app I would like to prioritise patterns matching in certain fields and weight the score dependent on that.

For example patterns matching in a title are usually more important than patterns matching in a description. This is how I would like to use the options:

class Artwork

  include Mongoid::Document
  include Mongoid::FullTextSearch

  field :title
  field :description

  fulltext_search_in :title, :description,
                     :priorities => { :title => 10, :description => 5 }

end

Is this even possible to emulate without a massive performance loss?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants