   # need to agent.
  
   import Tirexs.Bulk
+  import Tirexs.Query
   import Tirexs.Search
   import Tirexs.Mapping
   import Tirexs.Index.Settings
 
-  require Tirexs.Query
   require Tirexs.ElasticSearch
 
   require Logger

      end
    end

    Logger.debug "#{inspect queries}"
    Tirexs.Query.create_resource(queries)
  end


      create search_data(model)
    end
  end

  #### for develop #####
  def put_document(model, tags, divas) do
    Tirexs.Bulk.store [index: @index_name, refresh: true], Tirexs.ElasticSearch.config() do
      create search_data(model, tags, divas)
    end
  end

  def search_data(model, tags, divas) do
    search_data(model) ++ [
      tags: tags,
      divas: divas
    ]
  end
  #########

  def search_data(model) do
    [
