You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by jawedshamshedi <ja...@gmail.com> on 2011/11/18 08:22:24 UTC

Creating index in multicore solr

Hi All,
I created two core and they are showing http://{localhost}:8983/solr/ and
which I click on them the admin panel is opened. The solr.xml files has
below given code.

<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true" >
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="core0" />
<core name="core1" instanceDir="core1" />
</cores>
</solr>

And I create the folder accordingly. But when I try to add handler to it
suppose to core1 in the core1->config->solrconfig.xml , the core0 disappears
from the core list

The core for requesthandler is given below.
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
        <lst name="defaults">
            <str name="config">data-config.xml</str>
        </lst>
    </requestHandler>

The content of data-config.xml under core0/conf is:

<dataConfig>
	<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lc" user="root" password=""/>
	<document name="content">
        <entity name="stock" query="select
ST_StockID,ST_StockCode,ST_Name,ST_ItemDetail from stock where estatus =
'Active' limit 100">
           	<field column="ST_StockID" name="ST_StockID" />
                <field column="ST_StockCode" name="ST_StockCode" />
                <field column="ST_Name" name="ST_Name" />
		<field column="ST_ItemDetail" name="ST_ItemDetail" />
        </entity>
</document>
</dataConfig>


The url I am using for core0 to do a full-import is
http://localhost:8983/solr/core0/admin/dataimport.jsp?handler=/dataimport
http://localhost.1.48:8983/solr/core0/dataimport?command=full-import

But in response I am getting
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</lst>
<str name="command">full-import</str>
<str name="status">idle</str>
<str name="importResponse"/>
−
<lst name="statusMessages">
<str name="Time Elapsed">0:0:0.172</str>
<str name="Total Requests made to DataSource">0</str>
<str name="Total Rows Fetched">0</str>
<str name="Total Documents Processed">0</str>
<str name="Total Documents Skipped">0</str>


<str name="Full Dump Started">2011-11-18 12:42:02</str>
<str name="">Indexing failed. Rolled back all changes.</str>
<str name="Rolledback">2011-11-18 12:42:02</str>
</lst>
−
<str name="WARNING">
This response format is experimental.  It is likely to change in the future.
</str>
</response>

Any help will be appreciated. 

--
View this message in context: http://lucene.472066.n3.nabble.com/Creating-index-in-multicore-solr-tp3518025p3518025.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: Creating index in multicore solr

Posted by Chris Hostetter <ho...@fucit.org>.
: And I create the folder accordingly. But when I try to add handler to it
: suppose to core1 in the core1->config->solrconfig.xml , the core0 disappears
: from the core list

"disappears" as in no longer shows up on the admin screen at all?  that's 
odd.  does your solr.xml file change as well?

: The content of data-config.xml under core0/conf is:

I'm not sure if that's just a typo or not, but at various point in your 
email you said you are adding the usage of dataimport handler to core1, 
and in other places you talk about putting data-config.xml in core0/conf 
... perhaps you're having problems because the config can't even be found?

have you checked your logs to see what DIH is saying on core load and/or 
when you try to execute the import?

FWIW: Future questions about Solr should be sent to the solr-user@lucene 
mailing list (which has more subscribers and is more likeley to generate 
responses).  general@lucene is for discussions about the broader Lucene 
project as a whole.


-Hoss