Skip to content

Instantly share code, notes, and snippets.

@atomotic
Created April 4, 2018 07:33
Embed
What would you like to do?

install solr and create a core (books)

brew install solr
solr start
solr create -c books -d /usr/local/Cellar/solr/7.2.1/example/files/conf

index a pdf

post -c books /tmp/gabriella-giannachi-archive-everything-mapping-the-everyday.pdf

search

curl "http://localhost:8983/solr/books/select?fl=id,url_ss&q=*:*"

results

{
  "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "q":"*:*",
      "fl":"id,url_ss"}},
  "response":{"numFound":2,"start":0,"docs":[
      {
        "id":"/tmp/gabriella-giannachi-archive-everything-mapping-the-everyday.pdf",
        "url_ss":["https://lccn.loc.gov/2016015620",
          "https://lccn.loc.gov/2016015620",
          "https://lccn.loc.gov/2016015620",
          "guerillagirls.com.",
          "Rhizome.org",
          "http://lib.stanford.edu/women-art-revolution",
          "http://lib.stanford.edu/women-art-revolution",
          "http://lib.stanford.edu/women-art-revolution",
          "rawwar.org/.",
          "http://rawwar.org/",
          "http://rawwar.org/",
          "http://rawwar.org/",
          "http://rawwar.org/",
          "guerillagirls.com.",
          "http://www.rawwar.org",
          "http://www.rawwar.org",
          "http://www.rawwar.org",
          "w3.org",
          "http://iperg.sics.se/Deliverables/D17.2-Game-design-document-CCG-Rider-Spoke.pdf.",
          "http://web.archive.org/web/20110505090210/http://asv.vatican.va/en/arch/",
          "http://iperg.sics.se/Deliverables/D17.2-Game-design-document-CCG-Rider-Spoke.pdf",
          "http://iperg.sics.se/Deliverables/D17.2-Game-design-document-CCG-Rider-Spoke.pdf",
          "http://web.archive.org/web/20110505090210/http://asv.vatican.va/en/arch/1_past.htm",
          "http://web.archive.org/web/20110505090210/http://asv.vatican.va/en/arch/1_past.htm",
          "http://web.archive.org/web/20110505090210/http://asv.vatican.va/en/arch/1_past.htm",
          "http://web.archive.org/web/20110505090210/http://asv.vatican.va/en/arch/1_past.htm",
	....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment