Skip to content

Instantly share code, notes, and snippets.

@broquaint
Last active December 31, 2015 19:59
Show Gist options
  • Save broquaint/8037288 to your computer and use it in GitHub Desktop.
Save broquaint/8037288 to your computer and use it in GitHub Desktop.
When I call addField on solr-doc in the let and evaluate solr-doc last I always end up with the exception.
galen.core> (let [solr-doc (SolrInputDocument.)]
(.getFieldValue solr-doc "id")
solr-doc)
{}
galen.core> (let [solr-doc (SolrInputDocument.)]
(.addField solr-doc "id" "xyz")
solr-doc)
ClassCastException org.apache.solr.common.SolrInputField cannot be cast to java.util.Map$Entry clojure.core/key (core.clj:1482)
galen.core> (let [solr-doc (SolrInputDocument.) _ (.addField solr-doc "id" "xyz")]
solr-doc)
ClassCastException org.apache.solr.common.SolrInputField cannot be cast to java.util.Map$Entry clojure.core/key (core.clj:1482)
galen.core> (let [solr-doc (SolrInputDocument.)]
(.addField solr-doc "id" "foo"))
nil
@erasmas
Copy link

erasmas commented Aug 21, 2015

Thanks for the comments, I encountered the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment