lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hando420 <hando...@gmail.com>
Subject Re: Quering the database
Date Mon, 02 Aug 2010 11:41:52 GMT

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.

Mime
View raw message