MySQL Database is Indexed at Apache Solr, How to access it via URL
        Posted  
        
            by 
                Wasim
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Wasim
        
        
        
        Published on 2013-10-27T11:04:45Z
        Indexed on 
            2013/10/27
            21:54 UTC
        
        
        Read the original article
        Hit count: 285
        
data-config.xml
<dataConfig>
 <dataSource encoding="UTF-8" type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/somevisits" user="root" password=""/>
 <document name="somevisits">
  <entity name="login" query="select * from login">
   <field column="sv_id" name="sv_id" />
   <field column="sv_username" name="sv_username" />
  </entity>
 </document>
</dataConfig>
schema.xml
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="example" version="1.5">
    <fields>
        <field name="sv_id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> 
        <field name="username" type="string" indexed="true" stored="true" required="true"/>
        <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
        <field name="text" type="string" indexed="true" stored="false" multiValued="true"/> 
    </fields>
    <uniqueKey>sv_id</uniqueKey>
    <types>
        <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
        <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
    </types>
</schema>
Solr successfully imported mysql database using full http://[localSolr]:8983/solr/#/collection1/dataimport?command=full-import
My question is, how to access that mysql imported database now?
© Stack Overflow or respective owner