Skip to content

[Feature] Weighted/Prioritised search fields #13

@zeevallin

Description

@zeevallin

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions