carmen icon indicating copy to clipboard operation
carmen copied to clipboard

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

Open StanisLove opened this issue 3 years ago • 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.

StanisLove avatar Feb 18 '22 05:02 StanisLove