I have created a Play 2.1 Scala application. I am uncertain what's the best way to call Solr from a Play application:
- There is no Solr module for Play 2.
- AFAIK all Solr-APIs like SolrJ are blocking.
- I could wrap a SolrJ call into a
Future
, but this will also block a thread, correct? Should I use the
play.api.libs.ws.WS
library to call Solr and use Plays JSON support to extract the result (like in the example below) or is there any easier/faster way?val solrQuery: Future[play.api.libs.ws.Response] = WS.url("http://localhost:8983/solr/collection1/select?q=id%3A123&wt=json").get()