Querying Solr from Python with MySolr

Introduction MySolr is an API for Apache’s Solr for python. You can install mysolr using your favorite package manager. In the last post I have showed you how to update, select, and delete index using curl. Today, I will show you how we do those things using mysolr. Basic Configuration There is nothing special with solr configuration. The first thing you should do is importing Solr from mysolr. If you have done that, you can set the connection. [Read More]

Play with Apache Solr

Okay, Solr. It’s the first time I play with Solr. I will never know about it if I don’t join this company. Let’s start with selecting index. Select We can select an index using this command: curl http://localhost:8983/solr/{core}/select?q=id:{id} Insert / Update There are two commands to insert or update index. Just remember, the structure should be identical. Insert / Update with JSON curl http://localhost:8983/solr/{core}/update?commit=true -H 'Content-type:application/json' -d '[ { "id":"{id}", "desc":"{description}" } ]' Insert / Update with XML curl http://localhost:8983/solr/{core}/update? [Read More]