Home

Awesome

SolrDora

This is a small Go program to explore the data in a Solr core.

The core of the Solr functionality is provided by this other Go package. What SolrDora does is put a web user interface on top of it.

See a screenshot of what it looks like once it's running.

Source Code

The main components of the code are:

Compiling and running

To get started

git clone https://github.com/hectorcorrea/solrdora.git
cd solrdora
go get
go build
./solrdora settings.json

Settings.json

You'll need to provide a file with the settings for SolrDora to know what Solr to connect to and some basics about it. The file settings.json in this repo is a good place to start.

{
  "serverAddress": "localhost:9001",
  "solrCoreUrl": "http://localhost:8983/solr/bibdata",
  "solrOptions" : {
    "defType": "edismax",
    "qf": "author_txt_en title_txt_en^100",
    "wt": "json",
    "facet.limit": "20",
    "facet.mincount": "1",
    "hl": "on"
  },
  "solrFacets": {
    "subjects_ss": "1|Subject",
    "publisher_name_s": "2|Publisher"
  },
  "searchFl": ["id", "title_txt_en", "author_txt_en"],
  "viewOneFl": ["id", "title_txt_en", "author_txt_en", "authors_other_txts_en", "subjects_ss", "publisher_name_s", "publisher_place_s"]
}

The format for solrFacets is "field_name" : "display title", notice that you can force the order of the facets by prefixing the display value with a number (e.g. "1|Subjects").

This program expects Solr's responses to be in JSON. If you Solr core does not return JSON by default (i.e. if you are using an old version of Solr), make sure to add "wt":"json" to solrOptions to request JSON as the output format.

Executable

If you don't care about the source code, download the executable for your operating system, and follow the instructions on Release tab.