carmen-ruby/carmen

Search through countries is not so effective, as it may be

Opened this issue · 0 comments

Hi, there are methods defined in Carmen::Country class

    def self.all
      World.instance.subregions
    end
    
    def self.query_collection
      all
    end

and all finders use it in a such way query_collection.find

But what if I knowingly would like to search only through European countries, and the other part of the World is not my business?

I think the ability to set a desired scope of countries may be an option, or to prioritize this list, to have the most needed countries at the top. But the worst case would be still more expensive than could be in the second option.