On Thu, Mar 5, 2009 at 10:09 PM, Radha C. <cra...@ceiindia.com> wrote:
> I want to understand fully what is configured and how to configure , So I > tried to index my local MySql DB directly with one simple table called > persons in it. > But I am getting lot of errors. the following are the steps I did, > 1. downloaded solr-2009-03-03.zip > <http://people.apache.org/builds/lucene/solr/nightly/solr-2009-03-03.zip> > distribution and extracted to d:/solrtemp/ > 2. copied the example/solr to d:/solr ( this is my solr home ) for my > application template. > 3. set this solr home insidecatalina-home/localconfig/solr.xml > 4. create the data-config under $solrhome/config > here is my dataconfig file > <dataConfig> > <dataSource driver="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/test" user="xxx" password="xxxx" /> > <document name="employees"> > <entity name="persons" pk="personid" query="select * from > persons" deltaQuery="select personID from persons where last_modified > > '${dataimporter.last_index_time}'"> > <field column="firstname"/> > <field column="lastName"/> > <field column="age"/> > </entity> > </document> > </dataConfig> > > I am not sure what needs to be done next. I am getting error when I start > tomcat. Just like you write DDL for databases, you need to define a schema in Solr as well. The missing step is to change solr's schema.xml according to the fields you want to index. Look at http://wiki.apache.org/solr/SchemaXml for details. The errors are a way of warning you that there are certain required fields in schema which are never filled by the configuration in the data-config. > > > Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImportHandler > processConfiguration > INFO: Processing configuration from solrconfig.xml: > {config=data-config.xml} > Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImporter > loadDataConfig > INFO: Data Configuration loaded successfully > Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImporter > verifyWithSchema > INFO: id is a required field in SolrSchema . But not found in DataConfig > Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImportHandler > inform > SEVERE: Exception while loading DataImporter > org.apache.solr.handler.dataimport.DataImportHandlerException: There are > errors in the Schema > The field :age present in DataConfig does not have a counterpart in Solr > Schema > The field :firstname present in DataConfig does not have a counterpart in > Solr Schema > The field :personid present in DataConfig does not have a counterpart in > Solr Schema > The field :lastName present in DataConfig does not have a counterpart in > Solr Schema > at > > org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:108 > ) > at > > org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandle > r.java:95) > at > org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388) > at > > org.apache.solr.core.SolrCore.<init>(SolrCore.java:571)..................... > . > Mar 5, 2009 9:10:28 PM org.apache.solr.servlet.SolrDispatchFilter init > SEVERE: Could not start SOLR. Check solr/home property > org.apache.solr.common.SolrException: FATAL: Could not create importer. > DataImporter config invalid > at > > org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandle > r.java:103) > at > org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) > Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: > There are errors in the Schema > The field :age present in DataConfig does not have a counterpart in Solr > Schema > The field :firstname present in DataConfig does not have a counterpart in > Solr Schema > The field :personid present in DataConfig does not have a counterpart in > Solr Schema > The field :lastName present in DataConfig does not have a counterpart in > Solr Schema > at > > org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:108 > ) > at > > org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandle > r.java:95) > ... 31 more > Mar 5, 2009 9:10:28 PM org.apache.solr.core.QuerySenderListener newSearcher > > I want to write a small seperate application without relying on examples, > can you provide me some useful steps how to do that. > > Thanks > > _____ > > From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] > Sent: Thursday, March 05, 2009 5:16 PM > To: solr-user@lucene.apache.org; cra...@ceiindia.com > Subject: Re: How to search the database tables using solr. > > > On Thu, Mar 5, 2009 at 4:42 PM, Radha C. <cra...@ceiindia.com> wrote: > > > > Hi, > > I am newbie for solr search engin. I don't find any juicy information on > how > to configure the ORACLE data base to index the tables using solr search > engin. There are huge documents spread over wiki pages. I need some core > information. > I am using Apache-tomcat 5.5.26, and oracle 9i. Can you please provide me a > brief details for installing and configuring the database with solr and how > to indexing the rows. Your help will really save lot of my time. > > > > > Have you been able to run the example/example-DIH demo? If yes, using > Oracle > database instead of the HSQLDB used in the example is easy. Substitute the > driver name, username, password with the appropriate values for your > database. Make sure you add the oracle driver's jar file to $solr_home/lib. > > -- > Regards, > Shalin Shekhar Mangar. > > -- Regards, Shalin Shekhar Mangar.