LastfmArchive.load_archive
You're seeing just the function
load_archive
, go back to LastfmArchive module for more information.
Specs
load_archive(binary(), solr_url()) :: :ok | {:error, Hui.Error.t()}
Load all TSV data from the archive into Solr for a Lastfm user.
The function finds TSV files from the archive and sends them to
Solr for ingestion one at a time. It uses Hui
client to interact
with Solr and the Hui.URL.t/0
struct
for Solr endpoint specification.
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}
LastfmArchive.load_archive("a_lastfm_user", url)
TSV files must be pre-created before the loading - see
transform_archive/2
.