     ""
   end
 
-  def facets(%Esolr{facets: fields}) do
-    "facet=true&facet_field=" <> Enum.join(fields,"&facet.field=")
+  def facets(%Esolr{facets: fields, facet_limit: facet_limit}) do
+    "&facet=true&facet.limit=#{facet_limit}&facet.field=" <> Enum.join(fields,"&facet.field=")
   end
 
   def fields(%Esolr{wanted_fields: ""}) do


  def fields(%Esolr{wanted_fields: wanted_fields}) do
    "&fl=#{wanted_fields}"
  end

  def site(%Esolr{site: ""}) do
    ""
  end

  def site(%Esolr{site: site_string}) do
    "&site=#{site_string}"
  end

  def filter_queries(%Esolr{filters: []}) do

  end

  def build_url_with_query(query_struct) do
    FigaroElixir.env[query_struct.url] <> "/solr/#{query_struct.data_set}/select?" <> create_query(query_struct)
  end

  def process_response_body(body) do
