     ""
   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

  end

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

  def process_response_body(body) do

  use Jazz
  use HTTPoison.Base

  defstruct url: "url", data_set: "testing", query_string: "", 
    facets: [], facet_limit: 5,
    wanted_fields: "", filters: [], start: 0, rows: 0, date: [], wt: "json"

  # When we just want to pass through a whole url and query_string...(no construction of url required)
  def query(solr_query_url) when is_binary(solr_query_url) do
