Re: Call URL, simply parse the results using SolrJ

2010-02-09 Thread Noble Paul നോബിള്‍ नोब्ळ्
you can also try URL urlo = new URL(url);// ensure that the url has wt=javabin in that NamedList namedList = new JavaBinCodec().unmarshal(urlo.openConnection().getInputStream()); QueryResponse response = new QueryResponse(namedList, null); On Mon, Feb 8, 2010 at 11:49 PM, Jason Rutherglen wrote

Re: Call URL, simply parse the results using SolrJ

2010-02-08 Thread Jason Rutherglen
Ahmet, Thanks, though that isn't quite what I was going for, and it's resolved besides... On Mon, Feb 8, 2010 at 10:24 AM, Ahmet Arslan wrote: >> So here's what happens if I pass in a >> URL with parameters, SolrJ chokes: >> >> Exception in thread "main" java.lang.RuntimeException: >> Invalid ba

Re: Call URL, simply parse the results using SolrJ

2010-02-08 Thread Ahmet Arslan
> So here's what happens if I pass in a > URL with parameters, SolrJ chokes: > > Exception in thread "main" java.lang.RuntimeException: > Invalid base > url for solrj.  The base URL must not contain > parameters: > http://locahost:8080/solr/main/select?q=video&qt=dismax You can't pass url with pa

Re: Call URL, simply parse the results using SolrJ

2010-02-08 Thread Jason Rutherglen
Here's what I did to resolve this: XMLResponseParser parser = new XMLResponseParser(); URL urlo = new URL(url); InputStreamReader isr = new InputStreamReader(urlo.openConnection().getInputStream()); NamedList namedList = parser.processResponse(isr); QueryResponse response = new QueryResponse(named

Re: Call URL, simply parse the results using SolrJ

2010-02-08 Thread Jason Rutherglen
So here's what happens if I pass in a URL with parameters, SolrJ chokes: Exception in thread "main" java.lang.RuntimeException: Invalid base url for solrj. The base URL must not contain parameters: http://locahost:8080/solr/main/select?q=video&qt=dismax at org.apache.solr.client.solrj.im

Call URL, simply parse the results using SolrJ

2010-02-08 Thread Jason Rutherglen
Sorry for the poorly worded title... For SOLR-1761 I want to pass in a URL and parse the query response... However it's non-obvious to me how to do this using the SolrJ API, hence asking the experts here. :)