I'm having trouble choosing everything in my Solr index (3.6) in 25 documents via Solrj (running Tomcat).
public static void main(String[] args) throws MalformedURLException, SolrServerException { SolrServer solr = new HttpSolrServer("http://localhost:8080/solr"); ModifiableSolrParams parameters = new ModifiableSolrParams(); parameters.set("?q", "*:*"); parameters.set("wt", "json"); QueryResponse response = solr.query(parameters); System.out.println(response); }
The result is:
{responseHeader={status=0,QTime=0,params={?q=*:*,wt=javabin,version=2}},response={numFound=0,start=0,docs=[]}}
Also, if I take the "?" from parameters.set("?q", "*:*"); I need to stop compiling, otherwise it will end. The same thing happens if I replaced
"*:*"
with just
"*"
In addition, I tried parameters.set("qt", "/select"); to no avail.
How do you select everything and get results through Solrj?
Chris source share