Retrieve data after indexing mysql table

Even after indexing the mysql table in solr, I cannot get the data after the query, for example

http: // localhost: 8983 / solr / select /? q = slno: 5

My data-config.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<dataConfig>
    <dataSource type="JdbcDataSource"
                  driver="com.mysql.jdbc.Driver"
                  url="jdbc:mysql://localhost:3306/lbs"
                  user="user"
                  password="password"/>

    <document name="lbs">
        <entity name="radar_places"
                  query="select * from radar_places"

           deltaImportQuery="SELECT * FROM radar_places WHERE slno='${dataimporter.delta.slno}'"
  deltaQuery="SELECT slno FROM radar_places WHERE modified > '${dataimporter.last_index_time}'" >
            <field column="slno" name="slno" />
            <field column="place_id" name="place_id" />
            <field column="name" name="name" />
            <field column="geo_rss_point" name="geo_rss_point" />
        <field column="url" name="url" />
        <field column="location_id" name="location_id" />
        <field column="time" name="time" /> 
       </entity>
    </document>
</dataConfig>

In the browser that I used

http: // localhost: 8983 / solr / dataimport? command = full-import

Later, when I checked the status of the command http: // localhost: 8983 / solr / dataimport /

I got it

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
</lst>
<lst name="initArgs">
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</lst>
<str name="status">idle</str>
<str name="importResponse"/>
<lst name="statusMessages">
<str name="Total Requests made to DataSource">1</str>
<str name="Total Rows Fetched">1151</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2010-02-21 07:53:14</str>
<str name="">
Indexing completed. Added/Updated: 0 documents. Deleted 0 documents.
</str>
<str name="Committed">2010-02-21 07:53:24</str>
<str name="Optimized">2010-02-21 07:53:24</str>
<str name="Total Documents Processed">0</str>
<str name="Total Documents Failed">1151</str>
<str name="Time taken ">0:0:10.56</str>
</lst>
<str name="WARNING">
This response format is experimental.  It is likely to change in the future.
</str>
</response>

1) Should it do anything with <str name="Total Documents Failed">1151</str>

I can’t understand what is going wrong.

+3
source share
1 answer

Are you sure the data import configuration matches your Solr document schema?

+3
source

Source: https://habr.com/ru/post/1733767/


All Articles