1

I am working on indexing data from MySql into Solr . Following is the response XML I received after this command : localhost:8080/solr/dataimport?command=full-import&flush=true

<response>
 <lst name="responseHeader">
   <int name="status">0</int>
     <int name="QTime">5</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="Total Requests made to DataSource">1</str>
             <str name="Total Rows Fetched">2599</str>
           <str name="Total Documents Skipped">0</str>
          <str name="Full Dump Started">2012-12-04 11:51:45</str>
             <str name="">Indexing completed. Added/Updated: 0 documents. Deleted 0 documents.</str>
               <str name="Committed">2012-12-04 11:51:46</str><str name="Total Documents Processed">0</str>
           <str name="Time taken">0:0:1.112</str></lst
           ><str name="WARNING">This response format is experimental.  It is likely to change in the future.</str></response>

The index is supposed to be in the index directory under data directory right ? I tried viewing it through Luke GUI , it did not show anything , am I even able to create the index correctly here ? (My Sql query returns just one column and the field types have been defined in schema.xml)

This is my data-config.xml :

<dataConfig>
   <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"           url="jdbc:mysql://localhost/mydb" user="root" password="123"/>
    <document>
        <entity name="procname" query="Select ap.procname from cur_aprocedures ap 
                               left join test_data ts on ts.procid = ap.procid">
        <field column="procname" name="procname" />

</entity>       

1 Answer 1

1

Use the full import option with commit enabled. This would commit the data into the solr index and would be available for searching.
If you are doing DIH from the web UI screen, usually you would have a Commit checkbox which needs to be selected for Solr to commit the changes after the end of ther DIH cycle.

Sign up to request clarification or add additional context in comments.

1 Comment

There was some issue with the schema , I fixed it now , thanks for the answer . I have another issue to fix now , I don't want to raise a new question . So for the indexed terms(that I have now) I want to go ahead and related document id's , that would be done by adding a field type which is stored but not indexed right ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.