Note that there are some explanatory texts on larger screens.

plurals
  1. POClojure/Solr: Exception when trying to use org.apache.solr.client.solrj.impl.CommonsHttpSolrServer from Clojure
    primarykey
    data
    text
    <p>I am trying to upgrade the clojure-solr library to 1.3 (I did not write it originally, this is a fork) and I am encountering a problem when interacting to apache-solr-3.5.0. Here is the updated library on github: </p> <p><a href="https://github.com/antler/clojure-solr" rel="nofollow">https://github.com/antler/clojure-solr</a></p> <p>It is a very simple one file project that basically just imports the barebones java classes. I am trying to connect to the solr example app that comes bundled with the solr 3.5.0 release (this is one mirror):</p> <p><a href="http://www.fightrice.com/mirrors/apache//lucene/solr/3.5.0/" rel="nofollow">http://www.fightrice.com/mirrors/apache//lucene/solr/3.5.0/</a></p> <p>In this release I cd into example/ and run</p> <pre><code>java -jar start.jar </code></pre> <p>This seems to work fine. Then, from the repl in the clojure-solr project (after running lein deps):</p> <pre><code>(use 'clojure-solr) (with-connection (connect "http://127.0.0.1:8983/solr") (add-document! {"id" "testdoc", "name" "A Test Document"}) (add-documents! [{"id" "testdoc.2", "name" "Another test"} {"id" "testdoc.3", "name" "a final test"}]) (commit!) (search "test") (search "test" :rows 2)) </code></pre> <p>This is from the example given in the library originally. The call to connect runs fine, but fails on add with the following exception:</p> <pre><code>IllegalArgumentException No matching field found: add for class org.apache.solr.client.solrj.impl.CommonsHttpSolrServer </code></pre> <p>I checked in the solr docs and the add method is definitely there:</p> <p><a href="http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.html" rel="nofollow">http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.html</a></p> <p>What am I missing here? Thanks for any help!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload