I am using MS SQL server and want to index a table.
I setup my data-config like this:

<dataConfig>
        <dataSource type="JdbcDataSource" batchSize="25000" 
                autoCommit="true" 
                driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
                url="jdbc:sqlserver://localhost:1433;databaseName=MYDB" 
                user="****" password="****"/>

    <document name="products">
        <entity name="item" query="select TOP 50 * from items">
            <field column="item_id" name="id" />
            <field column="itemname" name="name" />
            <field column="itemavgbucost" name="price" />
            <field column="categoryname" name="cat" />            
            <field column="itemdesc" name="features"  />                
        </entity>
    </document>
</dataConfig>


I am unable to load data from database. I always receive 0 document fetched:
<lst name="statusMessages">
<str name="Time Elapsed">0:0:12.989</str>
<str name="Total Requests made to DataSource">1</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">2009-04-28 14:37:49</str>
</lst>

The query runs in SQL Server query manager and retrieves records. The funny
thing is, even if I purposefully write a wrong query with non-existing
tables I get the same response. What am I doing wrong? How can I tell
whether a query fails or succeeds or if solr is running the query in the
first place?

Any help is appreciated.
Best,
-Ci 


-- 
View this message in context: 
http://www.nabble.com/Unable-to-import-data-from-database-tp23283852p23283852.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to