LastfmArchive.Load.load_solr

You're seeing just the function load_solr, go back to LastfmArchive.Load module for more information.
Link to this function

load_solr(url, user, filename)

View Source

Specs

load_solr(Hui.URL.t(), binary(), binary()) ::
  {:ok, Hui.Http.t()} | {:error, :enoent}

Load a TSV file data from the archive into Solr for a Lastfm user.

The function reads and converts scrobbles in a TSV file from the file archive into a list of maps. The maps are sent to Solr for ingestion. Use Hui.URL.t/0 struct to specify the Solr endpoint.

Example

  # define a Solr endpoint with %Hui.URL{} struct
  headers = [{"Content-type", "application/json"}]
  url = %Hui.URL{url: "http://localhost:8983/solr/lastfm_archive", handler: "update", headers: headers}

  # ingest data scrobbled in 2018
  LastfmArchive.Load.load_solr(url, "a_lastfm_user", "tsv/2018.tsv.gz")

TSV files must be pre-created by transforming raw JSON Lastfm data - see LastfmArchive.transform_archive/2.