Or, if you want results from both together, you can use the distributed
search [1].
Just decide which one of the cores will be the "collector" and add the
shards=localhost:8983/solr/fund_dih,localhost:8983/solr/fund_tika parameter
like :

SolrServer server = new CommonsHttpSolrServer("
http://localhost:8983/solr/fund_dih";);
SolrQuery solrQuery = new SolrQuery();
solrQuery.setQuery("*:*");
solrQuery.setStart(0);
solrQuery.setRows(10);
solrQuery.setParam("shards","localhost:8983/solr/fund_dih,localhost:8983/solr/fund_tika");
QueryResponse response = server.query(solrQuery);


Hope this helps,
Tommaso

[1] : http://wiki.apache.org/solr/DistributedSearch

2011/5/20 Rohit <ro...@in-rev.com>

> Each core need to be queried separately,
>
> http://localhost:8983/solr/fund_dih/select?q=
> http://localhost:8983/solr/fund_tika/select?q=
>
> Regards,
> Rohit
>
>
> -----Original Message-----
> From: Zhao, Zane [mailto:zane.z...@fil.com]
> Sent: 20 May 2011 07:50
> To: solr-user@lucene.apache.org
> Subject: How can I query mutlitcore with solrJ
>
> Dear team.
>
> I installed to cores on my tomcat ,
>
> http://localhost:8983/solr/fund_dih/admin/
> http://localhost:8983/solr/fund_tika/admin/
>
> How can I send one query request via Solrj to these URL?
>
> Thanks and Regards
>
> Zane
>
>
>

Reply via email to