While using SOLRJ I would like to know how can I convert SolrQuery object to its URL representation with SOLR query syntax. I tried to use .toString() method but it doesnt
I recommend ClientUtils.toQueryString for this matter.
@Test
public void solrQueryToURL() {
SolrQuery tmpQuery = new SolrQuery("some query");
Assert.assertEquals("?q=some+query", ClientUtils.toQueryString(tmpQuery, false));
}
Within the source code of HttpSolrServer you can see that this is used by the Solrj code itself for this reason.
public NamedList