exsolr v0.0.1 Exsolr.Searcher

Provides search functions to Solr

Summary

Functions

Builds the solr url query. It will use the following default values if they are not specifier

Receives the query params, converts them to an url, queries Solr and builds the response

Functions

build_solr_query(params)

Builds the solr url query. It will use the following default values if they are not specifier

wt: “json” q: “:” start: 0 rows: 10

Examples

iex> Exsolr.Searcher.build_solr_query(q: "roses", fq: ["blue", "violet"])
"?wt=json&start=0&rows=10&q=roses&fq=blue&fq=violet"

iex> Exsolr.Searcher.build_solr_query(q: "roses", fq: ["blue", "violet"], start: 0, rows: 10)
"?wt=json&q=roses&fq=blue&fq=violet&start=0&rows=10"

iex> Exsolr.Searcher.build_solr_query(q: "roses", fq: ["blue", "violet"], wt: "xml")
"?start=0&rows=10&q=roses&fq=blue&fq=violet&wt=xml"
do_search(solr_query)
get()
get(params)

Receives the query params, converts them to an url, queries Solr and builds the response