lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jawedshamshedi <>
Subject Create index on two unrelated table in Solr
Date Fri, 18 Nov 2011 09:50:59 GMT
Hi All,

I want to create index between two tables, stock and auction. Basically I am
working on a product site. So I have to create index on both tables. and
they are not related at all.

In data-config.xml, that I created to create index, I wrote the following

    <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="stock_ST_StockID" />
            <field column="ST_StockCode" name="stock_ST_StockCode" />
            <field column="ST_Name" name="stock_ST_Name" />
            <field column="ST_ItemDetail" name="stock_ST_ItemDetail" />

        <entity name="auction" query="select
iauctionid,rad_number,vsku,auction_code from auction limit 100">
            <field column="iauctionid" name="auction_iauctionid" />
            <field column="rad_number" name="auction_rad_number" />
            <field column="vsku" name="auction_vsku" />
            <field column="auction_code" name="auction_auction_code" />

and the schema.xml contains the fields are given below.

<field name="stock_ST_StockID" type="string" indexed="true" stored="true"
    <field name="stock_ST_StockCode" type="string" indexed="true"
stored="true" required="true"/>
    <field name="stock_ST_Name" type="string" indexed="true" stored="true"
    <field name="stock_ST_ItemDetail" type="text" indexed="true"
stored="true" required="true"/>

    <field name="auction_iauctionid" type="string" indexed="true"
stored="true" required="true"/>
    <field name="auction_rad_number" type="string" indexed="true"
stored="true" required="true"/>
    <field name="auction_vsku" type="string" indexed="true" stored="true"
    <field name="auction_auction_code" type="text" indexed="true"
stored="true" required="true"/>


And when I hit this url :

I get the below xml is response.

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
<lst name="initArgs">
<lst name="defaults">
<str name="config">data-config.xml</str>
<str name="command">full-import</str>
<str name="status">idle</str>
<str name="importResponse"/>
<lst name="statusMessages">
<str name="Total Requests made to DataSource">2</str>
<str name="Total Rows Fetched">200</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2011-11-18 15:14:55</str>
<str name="">
Indexing completed. Added/Updated: 0 documents. Deleted 0 documents.
<str name="Committed">2011-11-18 15:14:55</str>
<str name="Optimized">2011-11-18 15:14:55</str>
<str name="Total Documents Processed">0</str>
<str name="Time taken ">0:0:0.47</str>
<str name="WARNING">
This response format is experimental.  It is likely to change in the future.

Any help will be appreciated .


View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message