Thank you for your reply.

Below is my data-config details.

<dataConfig>
  <dataSource type="JdbcDataSource" 
              driver="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost/userSearch" 
              user="root" 
              password="root" batchSize="-1"/>
                          
  <document>
    <entity name="search_result" pk="page_url" 
        
            query="select title, cast(content as char) as content,page_url
from search_result"
                        
        
        <field column="title" name="field_1"/>
        <field column="content" name="field_2"/>
        <field column="page_url" name="field_3"/>
    </entity>
  </document>
</dataConfig>

Below are the defined schema fields for the data-config

   <fields>
  <field name="field_1" type="string" indexed="true" stored="true"
required="true"/>
   <field name="field_2" type="string" indexed="true" stored="true"/>
     <field name="field_3" type="string" indexed="true" stored="true"/>
 </fields>
 <uniqueKey>field_1</uniqueKey>

 <!-- field for the QueryParser to use when an explicit fieldname is absent
-->
 <defaultSearchField>text</defaultSearchField>
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Quering-the-database-tp1015636p1015671.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to