Solr failing on "y" charakter in string?
Hi, I have the following setting: schema.xml: "" the "text" field-type was updated with the "preserveOriginal=1" option in the schema I have the following string indexd in the field "kunde" "Harry Heim KG" Now when I search for "kunde:harry*" it gives me an empty result. When I search for "kunde:harry" I get the right result. Also "kunde:harr*" works just fine. The strange thing is that with every other string (for example "kunde:heim*") I will get the right result. So why not on "harry*" with an "y*" at the end? kind regards, S. -- View this message in context: http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24783211.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr failing on "y" charakter in string?
Ok thanks you´re right. But the thing is my users will often search for expressions like: "Harr" or "har" etc.. So I thought I automatically add the wildcard "*" to every request. If that too gets me into trouble "Harr*"=>no result "harry*"=>no result What should I do? Otis Gospodnetic wrote: > > I believe it's because wildcard queries are not stemmed. During indexing > "harry" probably got stemmed to "harr", so now "harry*" doesn't match, > because there is no "harry" token in that string, only "harr". Why > wildcard queries are not analyzed is described in the Lucene FAQ on the > Lucene Wiki. > > You could also try searching for kunde:Harr* for example (not the > upper-case Harr). I bet it won't result in a hit for the same reason - at > index time you probably lower-case tokens with LowerCaseFilter(Factory), > and if you search for Harr*, the lower-casing won't happen because the > query string with the wildcard character isn't analyzed. > > Otis > -- > Sematext is hiring -- http://sematext.com/about/jobs.html?mls > Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR > > > > - Original Message >> From: gateway0 >> To: solr-user@lucene.apache.org >> Sent: Sunday, August 2, 2009 7:30:19 PM >> Subject: Solr failing on "y" charakter in string? >> >> >> Hi, >> >> I have the following setting: >> schema.xml: >> "" >> the "text" field-type was updated with the "preserveOriginal=1" option in >> the schema >> >> I have the following string indexd in the field "kunde" >> "Harry Heim KG" >> >> Now when I search for "kunde:harry*" it gives me an empty result. >> >> When I search for "kunde:harry" I get the right result. Also >> "kunde:harr*" >> works just fine. >> >> The strange thing is that with every other string (for example >> "kunde:heim*") I will get the right result. >> >> So why not on "harry*" with an "y*" at the end? >> >> kind regards, S. >> -- >> View this message in context: >> http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24783211.html >> Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24789070.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr failing on "y" charakter in string?
Ok still not working with new field "text_two": "text:"Har*" text_two:"Har*"" ==> result 0 Schema Updates: " " This is what you suggested, right? kind regards, S. gateway0 wrote: > > Hi, > > I have the following setting: > schema.xml: > "" > the "text" field-type was updated with the "preserveOriginal=1" option in > the schema > > I have the following string indexd in the field "kunde" > "Harry Heim KG" > > Now when I search for "kunde:harry*" it gives me an empty result. > > When I search for "kunde:harry" I get the right result. Also "kunde:harr*" > works just fine. > > The strange thing is that with every other string (for example > "kunde:heim*") I will get the right result. > > So why not on "harry*" with an "y*" at the end? > > kind regards, S. > -- View this message in context: http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24790774.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr failing on "y" charakter in string?
Ok still not working with new field "text_two": "text:"Har*" text_two:"Har*"" ==> result 0 Schema Updates: " " This is what you suggested, right? kind regards, S. Avlesh Singh wrote: > > The easiest thing to do would be to create a new field in your schema > which > only has a lowercasefilter applied to it. While searching perform searches > across the two fields. You'll get desired results. > > You can use the directive in your schema.xml for copying data > from your original field into the new field. > > Cheers > Avlesh > > On Mon, Aug 3, 2009 at 4:51 PM, gateway0 wrote: > >> >> Ok thanks you´re right. >> >> But the thing is my users will often search for expressions like: "Harr" >> or >> "har" etc.. >> >> So I thought I automatically add the wildcard "*" to every request. >> >> If that too gets me into trouble "Harr*"=>no result "harry*"=>no result >> >> What should I do? >> >> >> >> Otis Gospodnetic wrote: >> > >> > I believe it's because wildcard queries are not stemmed. During >> indexing >> > "harry" probably got stemmed to "harr", so now "harry*" doesn't match, >> > because there is no "harry" token in that string, only "harr". Why >> > wildcard queries are not analyzed is described in the Lucene FAQ on the >> > Lucene Wiki. >> > >> > You could also try searching for kunde:Harr* for example (not the >> > upper-case Harr). I bet it won't result in a hit for the same reason - >> at >> > index time you probably lower-case tokens with >> LowerCaseFilter(Factory), >> > and if you search for Harr*, the lower-casing won't happen because the >> > query string with the wildcard character isn't analyzed. >> > >> > Otis >> > -- >> > Sematext is hiring -- http://sematext.com/about/jobs.html?mls >> > Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR >> > >> > >> > >> > - Original Message >> >> From: gateway0 >> >> To: solr-user@lucene.apache.org >> >> Sent: Sunday, August 2, 2009 7:30:19 PM >> >> Subject: Solr failing on "y" charakter in string? >> >> >> >> >> >> Hi, >> >> >> >> I have the following setting: >> >> schema.xml: >> >> "" >> >> the "text" field-type was updated with the "preserveOriginal=1" option >> in >> >> the schema >> >> >> >> I have the following string indexd in the field "kunde" >> >> "Harry Heim KG" >> >> >> >> Now when I search for "kunde:harry*" it gives me an empty result. >> >> >> >> When I search for "kunde:harry" I get the right result. Also >> >> "kunde:harr*" >> >> works just fine. >> >> >> >> The strange thing is that with every other string (for example >> >> "kunde:heim*") I will get the right result. >> >> >> >> So why not on "harry*" with an "y*" at the end? >> >> >> >> kind regards, S. >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24783211.html >> >> Sent from the Solr - User mailing list archive at Nabble.com. >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24789070.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Solr-failing-on-%22y%22-charakter-in-string--tp24783211p24790836.html Sent from the Solr - User mailing list archive at Nabble.com.
UTF8 Problem with http request?
Hi, First of all I know that there is a utf8 problem with tomcat. So I updated the "server.xml" tomcat file with " " - So now the solr admin console returns an successful result for example: q=für result: " − 0 0 − on 0 für 10 2.2 − " - However if I use a http request through php5 I´ll get this result: " {"responseHeader":{"status":0,"QTime":0,"params":{"fl":"db_id,name,def,deadline","start":"0","q":"text:f�r text_two:f�r* ","wt":"json","fq":"","rows":"10"}},"response":{"numFound":0,"start":0,"docs":[]}} " If I look into the tomcat console I see this: " 14.08.2009 21:21:42 org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/select params={fl=db_id,name,def,deadline&start=0&q=text:f?r+text_two:f?r*+&wt=json&fq=&rows=10} hits=0 status=0 QTime=0 " I am quite sure it has something to do with the http request. Is it possible to set the charakterset for an http request? I cant find anything regarding the subject. kind regards, Sebastian -- View this message in context: http://www.nabble.com/UTF8-Problem-with-http-request--tp24977306p24977306.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: UTF8 Problem with http request?
Hi, 1. I use PHP5 what you suggested is a java function I would guess. In PHP there is something like this: " urlencode(utf8_encode($url)); " But sadly that doesnt help. 2. I don´t use Spring Strange thing. ANKITBHATNAGAR wrote: > > Hey Sebastian, > > Did u try - > 1; > URLEncoder.encode(url, "UTF-8"); > > > 2:if you application is Spring based-try this > > CharacterEncoding > > org.springframework.web.filter.CharacterEncodingFilter > > > encoding > UTF-8 > > > forceEncoding > true > > > > CharacterEncoding > /* > > > > > > Ankit > > From: gateway0 [reiterwo...@yahoo.de] > Sent: Friday, August 14, 2009 3:32 PM > To: solr-user@lucene.apache.org > Subject: UTF8 Problem with http request? > > Hi, > > First of all I know that there is a utf8 problem with tomcat. So I updated > the "server.xml" tomcat file with > " > connectionTimeout="2" >redirectPort="8443" >URIEncoding="UTF-8" /> > " > > - So now the solr admin console returns an successful result > for example: > q=für > > result: > " > > − > > 0 > 0 > − > > on > 0 > für > > 10 > 2.2 > > > − > > " > > - However if I use a http request through php5 I´ll get this result: > " > {"responseHeader":{"status":0,"QTime":0,"params":{"fl":"db_id,name,def,deadline","start":"0","q":"text:f�r > text_two:f�r* > ","wt":"json","fq":"","rows":"10"}},"response":{"numFound":0,"start":0,"docs":[]}} > " > > If I look into the tomcat console I see this: > " > 14.08.2009 21:21:42 org.apache.solr.core.SolrCore execute > INFO: [] webapp=/solr path=/select > params={fl=db_id,name,def,deadline&start=0&q=text:f?r+text_two:f?r*+&wt=json&fq=&rows=10} > hits=0 status=0 QTime=0 > " > > I am quite sure it has something to do with the http request. Is it > possible > to set the charakterset for an http request? > I cant find anything regarding the subject. > > kind regards, Sebastian > > -- > View this message in context: > http://www.nabble.com/UTF8-Problem-with-http-request--tp24977306p24977306.html > Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/UTF8-Problem-with-http-request--tp24977306p24977744.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: UTF8 Problem with http request?
Hi, thank you for your suggestions. I solved the problem now. It was the PHP function "strtolower()". As it turns out it can´t handle utf-8 strings. The solution is doing something like this in PHP: " $VALUE = "für"; $text = utf8_encode(strtolower(utf8_decode($VALUE))); " Thank you again "ANKITBHATNAGAR" kind regards, Sebastian ANKITBHATNAGAR wrote: > > I guess in the header you could try setting the Charest something like > this > > header('Content-Type: text/plain; charset=ISO-8859-1'); > > -Original Message- > From: gateway0 [mailto:reiterwo...@yahoo.de] > Sent: Friday, August 14, 2009 4:08 PM > To: solr-user@lucene.apache.org > Subject: RE: UTF8 Problem with http request? > > > Hi, > > 1. > I use PHP5 what you suggested is a java function I would guess. > In PHP there is something like this: > " > urlencode(utf8_encode($url)); > " > But sadly that doesnt help. > > 2. I don´t use Spring > > Strange thing. > > > > ANKITBHATNAGAR wrote: >> >> Hey Sebastian, >> >> Did u try - >> 1; >> URLEncoder.encode(url, "UTF-8"); >> >> >> 2:if you application is Spring based-try this >> >> CharacterEncoding >> >> org.springframework.web.filter.CharacterEncodingFilter >> >> >> encoding >> UTF-8 >> >> >> forceEncoding >> true >> >> >> >> CharacterEncoding >> /* >> >> >> >> >> >> Ankit >> >> From: gateway0 [reiterwo...@yahoo.de] >> Sent: Friday, August 14, 2009 3:32 PM >> To: solr-user@lucene.apache.org >> Subject: UTF8 Problem with http request? >> >> Hi, >> >> First of all I know that there is a utf8 problem with tomcat. So I >> updated >> the "server.xml" tomcat file with >> " >> >connectionTimeout="2" >>redirectPort="8443" >>URIEncoding="UTF-8" /> >> " >> >> - So now the solr admin console returns an successful result >> for example: >> q=für >> >> result: >> " >> >> − >> >> 0 >> 0 >> − >> >> on >> 0 >> für >> >> 10 >> 2.2 >> >> >> − >> >> " >> >> - However if I use a http request through php5 I´ll get this result: >> " >> {"responseHeader":{"status":0,"QTime":0,"params":{"fl":"db_id,name,def,deadline","start":"0","q":"text:f�r >> text_two:f�r* >> ","wt":"json","fq":"","rows":"10"}},"response":{"numFound":0,"start":0,"docs":[]}} >> " >> >> If I look into the tomcat console I see this: >> " >> 14.08.2009 21:21:42 org.apache.solr.core.SolrCore execute >> INFO: [] webapp=/solr path=/select >> params={fl=db_id,name,def,deadline&start=0&q=text:f?r+text_two:f?r*+&wt=json&fq=&rows=10} >> hits=0 status=0 QTime=0 >> " >> >> I am quite sure it has something to do with the http request. Is it >> possible >> to set the charakterset for an http request? >> I cant find anything regarding the subject. >> >> kind regards, Sebastian >> >> -- >> View this message in context: >> http://www.nabble.com/UTF8-Problem-with-http-request--tp24977306p24977306.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> >> > > -- > View this message in context: > http://www.nabble.com/UTF8-Problem-with-http-request--tp24977306p24977744.html > Sent from the Solr - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/UTF8-Problem-with-http-request--tp24977306p24978362.html Sent from the Solr - User mailing list archive at Nabble.com.
Using constants with DataImportHandler and MySQL ?
Hi, I tried to do the following in my "data-config.xml" file: Projects
Re: Using constants with DataImportHandler and MySQL ?
Here´s the solution: just insert a dummy sql field 'dataci_project' in your select statement. Glen Newton wrote: > > In MySql at least, you can do achieve what I think you want by > manipulating the SQL, like this: > > mysql> select "foo" as Constant1, id from Article limit 10; > select "foo" as Constant1, id from Article limit 10; > +---++ > | Constant1 | id | > +---++ > | foo | 1 | > | foo | 2 | > | foo | 3 | > | foo | 4 | > | foo | 5 | > | foo | 6 | > | foo | 7 | > | foo | 8 | > | foo | 9 | > | foo | 10 | > +---++ > 10 rows in set (0.00 sec) > > mysql> select 435 as Constant2, id from Article limit 10; > select 435 as Constant2, id from Article limit 10; > +---++ > | Constant2 | id | > +---++ > | 435 | 1 | > | 435 | 2 | > | 435 | 3 | > | 435 | 4 | > | 435 | 5 | > | 435 | 6 | > | 435 | 7 | > | 435 | 8 | > | 435 | 9 | > | 435 | 10 | > +---++ > 10 rows in set (0.00 sec) > > mysql> > > 2009/4/8 Shalin Shekhar Mangar : >> On Wed, Apr 8, 2009 at 10:23 PM, gateway0 wrote: >> >>> >>> The problem as you see is the line: >>> "Projects" >>> >>> I want to set a constant value for every row in the SQL table but it >>> doesn´t >>> work that way, any ideas? >>> >> >> That is not a valid syntax. >> >> There are two ways to do this: >> 1. In your schema.xml provide the 'default' attribute >> 2. Use TemplateTransformer - see >> http://wiki.apache.org/solr/DataImportHandlerFaq >> >> -- >> Regards, >> Shalin Shekhar Mangar. >> > > > > -- > > - > > -- View this message in context: http://www.nabble.com/Using-constants-with-DataImportHandler-and-MySQL---tp22954954p22969123.html Sent from the Solr - User mailing list archive at Nabble.com.
Dataimporthandler + MySQL = Datetime offset by 2 hours ?
Hi, im fetching entries from my mysql database and index them with the Dataimporthandler: MySQL Table entry: (for example) pr_timedate : 2009-04-14 11:00:00 entry in data-config.xml to index the mysql field: result in solr index: 2009-04-14T09:00:00Z:confused: it says 09:00:00 instead of 11:00:00 as it supposed to. I´ve searched for hours already, why is that? best wishes, Sebastian -- View this message in context: http://www.nabble.com/Dataimporthandler-%2B-MySQL-%3D-Datetime-offset-by-2-hours---tp22970250p22970250.html Sent from the Solr - User mailing list archive at Nabble.com.
Use more then one tag with Dataimporthandler ?
Hi, is it possible to use more than one tag within my data-config.xml file? Like: ...entities ...entities ??? kind regards, Sebastian -- View this message in context: http://www.nabble.com/Use-more-then-one-%3Cdocument%3E-tag-with-Dataimporthandler---tp23037189p23037189.html Sent from the Solr - User mailing list archive at Nabble.com.
MacOS "Failed to initialize DataSource:db"+ DataimportHandler ???
Hi, I want to transfer my solr project to mac os leopard so I installed xampp for mac and Tomcat 6.0.18. Everything works fine except for the dataimporthandler in solr, I get this error message: "org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to initialize DataSource: mydb Processing Document # at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:308) at " it seems failing in my data-config.xml file strange thing though the exact same file structure works under windows. Anyway here is the file: " " I have no idea what could cause the error. The only difference to my windows system is that xampp and the tomcat container are running seperatedly because of the fact that there is no xampp tomcat plugin for mac os but without the dataimporthandler solr is working just fine anyways. Ideas? best regards, Sebastian -- View this message in context: http://www.nabble.com/MacOS-%22Failed-to-initialize-DataSource%3Adb%22%2B-DataimportHandler-tp23263640p23263640.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: MacOS "Failed to initialize DataSource:db"+ DataimportHandler ???
57) ... 39 more - org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to initialize DataSource: mydb Processing Document # at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:308) at org.apache.solr.handler.dataimport.DataImporter.addDataSource(DataImporter.java:273) at org.apache.solr.handler.dataimport.DataImporter.initEntity(DataImporter.java:228) at org.apache.solr.handler.dataimport.DataImporter.(DataImporter.java:98) at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:106) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) at org.apache.solr.core.SolrCore.(SolrCore.java:480) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.apache.solr.common.SolrException: Could not load driver: com.mysql.jdbc.Driver at org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112) at org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:65) at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:306) ... 35 more Caused by: java.lang.ClassNotFoundException: Unable to load com.mysql.jdbc.Driver or org.apache.solr.handler.dataimport.com.mysql.jdbc.Driver at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:587) at org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:110) ... 37 more Caused by: org.apache.solr.common.SolrException: Error loading class 'com.mysql.jdbc.Driver' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:273) at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:577) ... 38 more Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:257) ... 39 more " Shalin Shekhar Mangar wrote: > > On Tue, Apr 28, 2009 at 1:18 AM, gateway0 wrote: > >> >> >> Everything works fine except for the dataimporthandler in solr, I get >> this >> error message: >> "org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to >> initialize DataSource: mydb Processing Document # at >> >> org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:308) >> at " >> >> > Can you please post the complete stack trace? > > -- > Regards, > Sh
Re: MacOS "Failed to initialize DataSource:db"+ DataimportHandler ???
That didn´t work either. All my libraries are at "/Applications/tomcat/webapps/solr/WEB-INF/lib" So is "apache-solr-dataimporthandler-1.3.0.jar" However I did create a new /lib directory under my solr home at "/Applications/solr" and copied the jar to that location as well. But no difference. Here is my entry for the dataimporthandler in solrconfig.xml (path:/Applications/solr/conf): " /Applications/solr/conf/data-config.xml " Noble Paul നോബിള് नोब्ळ् wrote: > > apparently you do not have the driver in the path. drop your driver > jar into ${solr.home}/lib > > On Tue, Apr 28, 2009 at 4:42 AM, gateway0 wrote: >> >> Hi, >> >> sure: >> " >> message Severe errors in solr configuration. Check your log files for >> more >> detailed information on what may be wrong. If you want solr to continue >> after configuration errors, change: >> false in null >> - >> org.apache.solr.common.SolrException: FATAL: Could not create importer. >> DataImporter config invalid at >> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:114) >> at >> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) >> at org.apache.solr.core.SolrCore.(SolrCore.java:480) at >> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) >> at >> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) >> at >> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) >> at >> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) >> at >> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) >> at >> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709) >> at >> org.apache.catalina.core.StandardContext.start(StandardContext.java:4363) >> at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) >> at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) >> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) >> at >> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627) >> at >> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) >> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) >> at >> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at >> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) >> at >> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) >> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >> at >> org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at >> org.apache.catalina.core.StandardService.start(StandardService.java:516) >> at >> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at >> org.apache.catalina.startup.Catalina.start(Catalina.java:578) at >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) at >> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at >> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: >> org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to >> initialize DataSource: mydb Processing Document # at >> org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:308) >> at >> org.apache.solr.handler.dataimport.DataImporter.addDataSource(DataImporter.java:273) >> at >> org.apache.solr.handler.dataimport.DataImporter.initEntity(DataImporter.java:228) >> at >> org.apache.solr.handler.dataimport.DataImporter.(DataImporter.java:98) >> at >> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:106) >> ... 31 more Caused by: org.apache.solr.common.SolrException: Could not >> load >> driver: com.mysql.jdbc.Driver at >> org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112) &g
Dataimporthandler & Timestamp Error ?
Hi, when I do a full import I get the following error : "Caused by: java.sql.SQLException: Cannot convert value '-00-00 00:00:00' from column 10 to TIMESTAMP. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1321) at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:573) at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6617) at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5943) at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4901) at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4951) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.getARow(JdbcDataSource.java:220) ... 11 more Caused by: java.sql.SQLException: Value '[...@14f9f4a' can not be represented as java.sql.Timestamp at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1027) ... 17 more" But I thought the Timestamp is generated automatically and has nothing to do with my mysql database? best regards, Sebastian -- View this message in context: http://www.nabble.com/Dataimporthandler---Timestamp-Error---tp23422139p23422139.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Dataimporthandler & Timestamp Error ?
Awesome, thanks!!! I first thought it could be "blob-field" related. Have a nice day Sebastian Noble Paul നോബിള് नोब्ळ्-2 wrote: > > you may need to change the mysql connection parameters so that it does > not throw error for null date > > "jdbc:mysql://localhost/test?zeroDateTimeBehavior=convertToNull" > > On Thu, May 7, 2009 at 1:39 PM, gateway0 wrote: >> >> Hi, >> >> when I do a full import I get the following error : >> >> "Caused by: java.sql.SQLException: Cannot convert value '-00-00 >> 00:00:00' from column 10 to TIMESTAMP. >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) >> at >> com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1321) >> at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:573) >> at >> com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6617) >> at >> com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5943) >> at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4901) >> at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4951) >> at >> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.getARow(JdbcDataSource.java:220) >> ... 11 more >> Caused by: java.sql.SQLException: Value '[...@14f9f4a' can not be >> represented >> as java.sql.Timestamp >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) >> at >> com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1027) >> ... 17 more" >> >> But I thought the Timestamp is generated automatically and has nothing to >> do >> with my mysql database? >> >> best regards, Sebastian >> -- >> View this message in context: >> http://www.nabble.com/Dataimporthandler---Timestamp-Error---tp23422139p23422139.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > - > Noble Paul | Principal Engineer| AOL | http://aol.com > > -- View this message in context: http://www.nabble.com/Dataimporthandler---Timestamp-Error---tp23422139p23424354.html Sent from the Solr - User mailing list archive at Nabble.com.
Use the same SQL Field in Dataimporthandler twice?
Hi, I tried to do the following: " " So I use the SQL Table Field "id" twice once for "db_id" in my index and for the sql query as "fid=id". That doesn´t work! But when I change the query from "fid=id" to like "fid=otherkey" it does work! Like: " " Is there any other kind of a workaround so I can use the SQL Field "id" twice as I wanted to? Thanks kind regards, Sebastian -- View this message in context: http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23904968.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Use the same SQL Field in Dataimporthandler twice?
Thanks for your answer. "${db.tableA.id}" that specifies the sql query that the Dataimporthandler should Use the sql field "id" in table "tableA" located in Database "db". like in the example from the Solr Wiki: " " It´s strange I know but when I use something other than "id" as the foreign key for the query everything works! like: "${db.tableA.anotherid}" Noble Paul നോബിള് नोब्ळ्-2 wrote: > > what is ${db.tableA.id} ? > > I think there is something extra in that > > can you paste the whole data-config.xml? > > can you paste > > On Sun, Jun 7, 2009 at 1:09 AM, gateway0 wrote: >> >> Hi, >> >> I tried to do the following: >> >> " >> >> >> >> >> >> " >> >> So I use the SQL Table Field "id" twice once for "db_id" in my index and >> for >> the sql query as "fid=id". >> >> That doesn´t work! >> >> But when I change the query from "fid=id" to like "fid=otherkey" it does >> work! >> Like: >> " >> >> >> >> >> >> " >> >> Is there any other kind of a workaround so I can use the SQL Field "id" >> twice as I wanted to? Thanks >> >> kind regards, Sebastian >> -- >> View this message in context: >> http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23904968.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > - > Noble Paul | Principal Engineer| AOL | http://aol.com > > -- View this message in context: http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23930286.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Use the same SQL Field in Dataimporthandler twice?
Ok here it goes: " " The name of the database is "dbA" and the table name is "project". Everything works out fine except the comment part highlighted (bold). That works to as I stated If I change the phrase to: " " so that I don´t use my primary key "id" twice but the problem is I need to use "id" for the comment part too. kind regards, Sebastian Noble Paul നോബിള് नोब्ळ्-2 wrote: > > On Tue, Jun 9, 2009 at 12:41 AM, gateway0 wrote: >> >> Thanks for your answer. >> >> "${db.tableA.id}" that specifies the sql query that the Dataimporthandler >> should Use the sql field "id" in table "tableA" located in Database "db". > > The naming convention does not work like that. > > if the entity name is 'tableA' then the field 'id' is addressed as > 'tableA.id' > > As I said earlier, if you could privide mw with the entire > data-config.xml it would be more helpful > >> >> like in the example from the Solr Wiki: >> " >> >> " >> >> It´s strange I know but when I use something other than "id" as the >> foreign >> key for the query everything works! >> >> like: >> "${db.tableA.anotherid}" >> >> >> >> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>> >>> what is ${db.tableA.id} ? >>> >>> I think there is something extra in that >>> >>> can you paste the whole data-config.xml? >>> >>> can you paste >>> >>> On Sun, Jun 7, 2009 at 1:09 AM, gateway0 wrote: >>>> >>>> Hi, >>>> >>>> I tried to do the following: >>>> >>>> " >>>> >>>> >>>> >>>> >>>> >>>> " >>>> >>>> So I use the SQL Table Field "id" twice once for "db_id" in my index >>>> and >>>> for >>>> the sql query as "fid=id". >>>> >>>> That doesn´t work! >>>> >>>> But when I change the query from "fid=id" to like "fid=otherkey" it >>>> does >>>> work! >>>> Like: >>>> " >>>> >>>> >>>> >>>> >>>> >>>> " >>>> >>>> Is there any other kind of a workaround so I can use the SQL Field "id" >>>> twice as I wanted to? Thanks >>>> >>>> kind regards, Sebastian >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23904968.html >>>> Sent from the Solr - User mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> - >>> Noble Paul | Principal Engineer| AOL | http://aol.com >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23930286.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > - > Noble Paul | Principal Engineer| AOL | http://aol.com > > -- View this message in context: http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23938282.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Use the same SQL Field in Dataimporthandler twice?
No I changed the entity name to "dbA:project" but still the same problem. Interesting sidenote If I use my Data-Config as posted (with the "id" field in the comment section) none of the other entities works anymore like for example: " entity name="user" dataSource="dbA" query="select username from ci_user where userid='${dbA.project.created_by}' "> " returns an empty result. Still can´t figure it out why I cant use the (sql)tables primary key - once to save it in the index directly and - twice to query against my comment table Noble Paul നോബിള് नोब्ळ्-2 wrote: > > can you avoid "." dots in the entity name and try it out. dots are > special characters and it should have caused some problem > > On Tue, Jun 9, 2009 at 1:37 PM, gateway0 wrote: >> >> Ok here it goes: >> " >> >> >> > driver="com.mysql.jdbc.Driver" >> url="jdbc:mysql://localhost:3306/dbA?zeroDateTimeBehavior=convertToNull" >> user="root" password=""/> >> >> > transformer="TemplateTransformer" query="select *, 'dbA.project' from >> project"> >> >> > template="${dbA.project.dbA.project},id:${dbA.project.id}"/> >> >> >> >> >> >> >> >> >> >> > dateTimeFormat="-MM-dd'T'hh:mm:ss"/> >> > dateTimeFormat="-MM-dd'T'hh:mm:ss"/> >> >> >> >> >> >> >> >> >> >> >> >> " >> The name of the database is "dbA" and the table name is "project". >> >> Everything works out fine except the comment part highlighted (bold). >> That >> works to as I stated If I change the phrase to: >> " >> >> >> >> " >> so that I don´t use my primary key "id" twice but the problem is I need >> to >> use "id" for the comment part too. >> >> kind regards, Sebastian >> >> >> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>> >>> On Tue, Jun 9, 2009 at 12:41 AM, gateway0 wrote: >>>> >>>> Thanks for your answer. >>>> >>>> "${db.tableA.id}" that specifies the sql query that the >>>> Dataimporthandler >>>> should Use the sql field "id" in table "tableA" located in Database >>>> "db". >>> >>> The naming convention does not work like that. >>> >>> if the entity name is 'tableA' then the field 'id' is addressed as >>> 'tableA.id' >>> >>> As I said earlier, if you could privide mw with the entire >>> data-config.xml it would be more helpful >>> >>>> >>>> like in the example from the Solr Wiki: >>>> " >>>> >>>> " >>>> >>>> It´s strange I know but when I use something other than "id" as the >>>> foreign >>>> key for the query everything works! >>>> >>>> like: >>>> "${db.tableA.anotherid}" >>>> >>>> >>>> >>>> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>>>> >>>>> what is ${db.tableA.id} ? >>>>> >>>>> I think there is something extra in that >>>>> >>>>> can you paste the whole data-config.xml? >>>>> >>>>> can you paste >>>>> >>>>> On Sun, Jun 7, 2009 at 1:09 AM, gateway0 wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I tried to do the following: >>>>>> >>>>>> " >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> " >>>>>> >>>>>> So I use the SQL Table Field "id" twice once for "db_id" in my index >>>>>> and >>>>>> for >>>>>> the sql query as "fid=id". >>>>>> >>>>>> That doesn´t work! >>>>>> >>>>>> But when I change the query from "fid=id" to like "fid=otherkey" it >>>>>> does >>>>>> work! >>>>>> Like: >>>>>> " >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> " >>>>>> >>>>>> Is there any other kind of a workaround so I can use the SQL Field >>>>>> "id" >>>>>> twice as I wanted to? Thanks >>>>>> >>>>>> kind regards, Sebastian >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23904968.html >>>>>> Sent from the Solr - User mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> - >>>>> Noble Paul | Principal Engineer| AOL | http://aol.com >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23930286.html >>>> Sent from the Solr - User mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> - >>> Noble Paul | Principal Engineer| AOL | http://aol.com >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23938282.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > - > Noble Paul | Principal Engineer| AOL | http://aol.com > > -- View this message in context: http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23939391.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Use the same SQL Field in Dataimporthandler twice?
Noticed this "warning" in the log file: " Jun 9, 2009 2:53:35 PM org.apache.solr.handler.dataimport.TemplateTransformer transformRow WARNING: Unable to resolve variable: dbA.project.id while parsing expression: ${dbA.project.dbA.project},id:${dbA.project.id} " Ok? Whats that suppose to mean? gateway0 wrote: > > No I changed the entity name to "dbA:project" but still the same problem. > > Interesting sidenote If I use my Data-Config as posted (with the "id" > field in the comment section) none of the other entities works anymore > like for example: > " > entity name="user" dataSource="dbA" query="select username from > ci_user where userid='${dbA.project.created_by}' "> > > > " > returns an empty result. > > Still can´t figure it out why I cant use the (sql)tables primary key > - once to save it in the index directly and > - twice to query against my comment table > > > > > > Noble Paul നോബിള് नोब्ळ्-2 wrote: >> >> can you avoid "." dots in the entity name and try it out. dots are >> special characters and it should have caused some problem >> >> On Tue, Jun 9, 2009 at 1:37 PM, gateway0 wrote: >>> >>> Ok here it goes: >>> " >>> >>> >>> >> driver="com.mysql.jdbc.Driver" >>> url="jdbc:mysql://localhost:3306/dbA?zeroDateTimeBehavior=convertToNull" >>> user="root" password=""/> >>> >>> >> transformer="TemplateTransformer" query="select *, 'dbA.project' from >>> project"> >>> >>> >> template="${dbA.project.dbA.project},id:${dbA.project.id}"/> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> dateTimeFormat="-MM-dd'T'hh:mm:ss"/> >>> >> dateTimeFormat="-MM-dd'T'hh:mm:ss"/> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> " >>> The name of the database is "dbA" and the table name is "project". >>> >>> Everything works out fine except the comment part highlighted (bold). >>> That >>> works to as I stated If I change the phrase to: >>> " >>> >>> >>> >>> " >>> so that I don´t use my primary key "id" twice but the problem is I need >>> to >>> use "id" for the comment part too. >>> >>> kind regards, Sebastian >>> >>> >>> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>>> >>>> On Tue, Jun 9, 2009 at 12:41 AM, gateway0 wrote: >>>>> >>>>> Thanks for your answer. >>>>> >>>>> "${db.tableA.id}" that specifies the sql query that the >>>>> Dataimporthandler >>>>> should Use the sql field "id" in table "tableA" located in Database >>>>> "db". >>>> >>>> The naming convention does not work like that. >>>> >>>> if the entity name is 'tableA' then the field 'id' is addressed as >>>> 'tableA.id' >>>> >>>> As I said earlier, if you could privide mw with the entire >>>> data-config.xml it would be more helpful >>>> >>>>> >>>>> like in the example from the Solr Wiki: >>>>> " >>>>> >>>>> " >>>>> >>>>> It´s strange I know but when I use something other than "id" as the >>>>> foreign >>>>> key for the query everything works! >>>>> >>>>> like: >>>>> "${db.tableA.anotherid}" >>>>> >>>>> >>>>> >>>>> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>>>>> >>>>>> what is ${db.tableA.id} ? >>>>>> >>>>>> I think there is something extra in that >>>>>> >>>>>> can you paste the whole data-config.xml? >>>>>> >>>>>> can you paste >>>>>> >>&
Re: Use the same SQL Field in Dataimporthandler twice?
Noticed this "warning" in the log file: " Jun 9, 2009 2:53:35 PM org.apache.solr.handler.dataimport.TemplateTransformer transformRow WARNING: Unable to resolve variable: dbA.project.id while parsing expression: ${dbA.project.dbA.project},id:${dbA.project.id} " Ok? Whats that suppose to mean? And yes I replaced the dots (with ":") from the entity names like you suggested. Still no change. Noble Paul നോബിള് नोब्ळ्-2 wrote: > > There should be no problem if you re-use the same variable > > are you sure you removed the dots from everywhere? > > > On Tue, Jun 9, 2009 at 2:55 PM, gateway0 wrote: >> >> No I changed the entity name to "dbA:project" but still the same problem. >> >> Interesting sidenote If I use my Data-Config as posted (with the "id" >> field >> in the comment section) none of the other entities works anymore like for >> example: >> " >> entity name="user" dataSource="dbA" query="select username from >> ci_user where userid='${dbA.project.created_by}' "> >> >> >> " >> returns an empty result. >> >> Still can´t figure it out why I cant use the (sql)tables primary key >> - once to save it in the index directly and >> - twice to query against my comment table >> >> >> >> >> >> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>> >>> can you avoid "." dots in the entity name and try it out. dots are >>> special characters and it should have caused some problem >>> >>> On Tue, Jun 9, 2009 at 1:37 PM, gateway0 wrote: >>>> >>>> Ok here it goes: >>>> " >>>> >>>> >>>> >>> driver="com.mysql.jdbc.Driver" >>>> url="jdbc:mysql://localhost:3306/dbA?zeroDateTimeBehavior=convertToNull" >>>> user="root" password=""/> >>>> >>>> >>> transformer="TemplateTransformer" query="select *, 'dbA.project' from >>>> project"> >>>> >>>> >>> template="${dbA.project.dbA.project},id:${dbA.project.id}"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> dateTimeFormat="-MM-dd'T'hh:mm:ss"/> >>>> >>> dateTimeFormat="-MM-dd'T'hh:mm:ss"/> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> " >>>> The name of the database is "dbA" and the table name is "project". >>>> >>>> Everything works out fine except the comment part highlighted (bold). >>>> That >>>> works to as I stated If I change the phrase to: >>>> " >>>> >>>> >>>> >>>> " >>>> so that I don´t use my primary key "id" twice but the problem is I need >>>> to >>>> use "id" for the comment part too. >>>> >>>> kind regards, Sebastian >>>> >>>> >>>> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>>>> >>>>> On Tue, Jun 9, 2009 at 12:41 AM, gateway0 wrote: >>>>>> >>>>>> Thanks for your answer. >>>>>> >>>>>> "${db.tableA.id}" that specifies the sql query that the >>>>>> Dataimporthandler >>>>>> should Use the sql field "id" in table "tableA" located in Database >>>>>> "db". >>>>> >>>>> The naming convention does not work like that. >>>>> >>>>> if the entity name is 'tableA' then the field 'id' is addressed as >>>>> 'tableA.id' >>>>> >>>>> As I said earlier, if you could privide mw with the entire >>>>> data-config.xml it would be more helpful >>>>> >>>>>> >>>>>> like in the example from the Solr Wiki: >>>>>> " >>>>>> >>>>>> " >>>>>> >>&g
Can´t use wildcard "*" on alphanumeric values?
Hi, I indexed my data and defined a defaultsearchfield named "text:" (). I copied all my other field values into that field. Now my problem: Lets say I have 2 values indexed 1.value "ABCD" 2.value "ABCD3456" Now when I do a wildcard search over that two values the following happens: - query:"q=AB*" => All two values are returned "ABCD" and "ABCD3456" => wildcard is functioning! - query:"q=ABCD3*" => No results are returned! (expected: "ABCD3456") => wildcard does not function! Am I doing something wrong? Is there a way to use wildcards on alphanumeric values? (offtopic: How is for example google dealing with a problem like that, are they hiding the wildcards from the user) kind regards Sebastian -- View this message in context: http://www.nabble.com/Can%C2%B4t-use-wildcard-%22*%22-on-alphanumeric-values--tp24369209p24369209.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Can´t use wildcard "*" on alphanumeric values?
Thank you, that was it. Why is the preserveOriginal="1" option nowhere documented? Shalin Shekhar Mangar wrote: > > On Tue, Jul 7, 2009 at 2:10 PM, gateway0 wrote: > >> >> I indexed my data and defined a defaultsearchfield named "text:" (> name="text" type="text" indexed="true" stored="false" >> multiValued="true"/>). >> >> Lets say I have 2 values indexed >> 1.value "ABCD" >> 2.value "ABCD3456" >> >> Now when I do a wildcard search over that two values the following >> happens: >> - query:"q=AB*" => All two values are returned "ABCD" and "ABCD3456" => >> wildcard is functioning! >> - query:"q=ABCD3*" => No results are returned! (expected: "ABCD3456") => >> wildcard does not function! >> >> Am I doing something wrong? Is there a way to use wildcards on >> alphanumeric >> values? >> > > I think the problem is that the WordDelimiterFilter applied on 'text' > type, > splits 'ABCD3456' into 'ABCD' and '3456' etc. Also, prefix queries are not > analyzed so that don't pass through the same filters. > > I guess one simple solution to your problem is to add preserveOriginal="1" > to the WordDelimiterFilterFactory definition inside the 'text' field type. > > -- > Regards, > Shalin Shekhar Mangar. > > -- View this message in context: http://www.nabble.com/Can%C2%B4t-use-wildcard-%22*%22-on-alphanumeric-values--tp24369209p24373135.html Sent from the Solr - User mailing list archive at Nabble.com.
Could not create importer. DataImporter config invalid at... MAC OSX
Hi, I wanted to port my windows installation of solr to mac os. But the following error occured: "Could not create importer. DataImporter config invalid at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:114) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) at org.apache.solr.core.SolrCore.(SolrCore.java:480) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) at ... " That are the changes to my solrconfig.xml: First hange (from the Windows Version): " /Applications/XAMPP/solr/conf/data-config.xml " Second change: " ${solr.data.dir:/Applications/XAMPP/solr/data} " When I leave the Dataimporthandler out of the config file it works! But how do I get the Dataimporthandler to work on mac os? kind regards, Sebastian -- View this message in context: http://www.nabble.com/Could-not-create-importer.-DataImporter-config-invalid-at...-MAC-OSX-tp24407175p24407175.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Could not create importer. DataImporter config invalid at... MAC OSX
Here is my data-config.xml: " " Noble Paul നോബിള് नोब्ळ्-2 wrote: > > there is something wrong w/ your data-config.xml you can paste it here > > On Thu, Jul 9, 2009 at 3:14 PM, gateway0 wrote: >> >> Hi, >> >> I wanted to port my windows installation of solr to mac os. But the >> following error occured: >> >> "Could not create importer. DataImporter config invalid at >> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:114) >> at >> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) >> at org.apache.solr.core.SolrCore.(SolrCore.java:480) at >> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) >> at >> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) >> at >> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) >> at >> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) >> at ... " >> >> That are the changes to my solrconfig.xml: >> >> First hange (from the Windows Version): >> " >> > class="org.apache.solr.handler.dataimport.DataImportHandler"> >> >> > name="config">/Applications/XAMPP/solr/conf/data-config.xml >> >> >> " >> >> Second change: >> " >> ${solr.data.dir:/Applications/XAMPP/solr/data} >> " >> >> When I leave the Dataimporthandler out of the config file it works! But >> how >> do I get the Dataimporthandler to work on mac os? >> >> kind regards, Sebastian >> -- >> View this message in context: >> http://www.nabble.com/Could-not-create-importer.-DataImporter-config-invalid-at...-MAC-OSX-tp24407175p24407175.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > - > Noble Paul | Principal Engineer| AOL | http://aol.com > > -- View this message in context: http://www.nabble.com/Could-not-create-importer.-DataImporter-config-invalid-at...-MAC-OSX-tp24407175p24407520.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Could not create importer. DataImporter config invalid at... MAC OSX
solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) at org.apache.solr.core.SolrCore.(SolrCore.java:480) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.apache.solr.common.SolrException: Could not load driver: com.mysql.jdbc.Driver at org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112) at org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:65) at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:306) ... 35 more Caused by: java.lang.ClassNotFoundException: Unable to load com.mysql.jdbc.Driver or org.apache.solr.handler.dataimport.com.mysql.jdbc.Driver at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:587) at org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:110) ... 37 more Caused by: org.apache.solr.common.SolrException: Error loading class 'com.mysql.jdbc.Driver' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:273) at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:577) ... 38 more Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:257) ... 39 more ) that prevented it from fulfilling this request. " Noble Paul നോബിള് नोब्ळ्-2 wrote: > > Is this the complete stacktrace ? or is there anything else that is > missing? > > On Thu, Jul 9, 2009 at 3:14 PM, gateway0 wrote: >> >> Hi, >> >> I wanted to port my windows installation of solr to mac os. But the >> following error occured: >> >> "Could not create importer. DataImporter config invalid at >> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:114) >> at >> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) >> at org.apache.solr.core.SolrCore.(SolrCore.java:480) at >> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) >> at >> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) >> at >> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) >> at >> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397
Re: Could not create importer. DataImporter config invalid at... MAC OSX
What driver do you mean exactly (filename & path) so I can compare my installation on xp and mac os? Noble Paul നോബിള് नोब्ळ्-2 wrote: > > so it says the driver is not present in the classpath. > > On Thu, Jul 9, 2009 at 4:11 PM, gateway0 wrote: >> >> Here is the complete error message: >> " >> type Status report >> >> message Severe errors in solr configuration. Check your log files for >> more >> detailed information on what may be wrong. If you want solr to continue >> after configuration errors, change: >> false in null >> - >> org.apache.solr.common.SolrException: FATAL: Could not create importer. >> DataImporter config invalid at >> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:114) >> at >> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) >> at org.apache.solr.core.SolrCore.(SolrCore.java:480) at >> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) >> at >> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) >> at >> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) >> at >> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) >> at >> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) >> at >> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800) >> at >> org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) >> at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) >> at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) >> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) >> at >> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) >> at >> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) >> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) >> at >> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at >> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) >> at >> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >> at >> org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at >> org.apache.catalina.core.StandardService.start(StandardService.java:516) >> at >> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at >> org.apache.catalina.startup.Catalina.start(Catalina.java:583) at >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) at >> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at >> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: >> org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to >> initialize DataSource: newlift Processing Document # at >> org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:308) >> at >> org.apache.solr.handler.dataimport.DataImporter.addDataSource(DataImporter.java:273) >> at >> org.apache.solr.handler.dataimport.DataImporter.initEntity(DataImporter.java:228) >> at >> org.apache.solr.handler.dataimport.DataImporter.(DataImporter.java:98) >> at >> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:106) >> ... 31 more Caused by: org.apache.solr.common.SolrException: Could not >> load >> driver: com.mysql.jdbc.Driver at >> org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112) >> at >> org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:65) >> at >> org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:306) >> ... 35 more Caused by: java.lang.ClassNotFoundException: Unable to load >> com.mysql.jdbc.Driver or >> org.apache.solr.handler.dataimport.com
Re: Could not create importer. DataImporter config invalid at... MAC OSX
Is it maybe the installation paths. On XP I used: - xampp ("G:\xampp") - installed tomcat plugin for xampp ("G:\xampp\tomcat") - solr incl. data dir ("G:\solr") On Mac I used: - xampp for mac (path: /Applications/XAMPP/...) - tomcat 6.0.20 (path: /Applications/tomcat 6.0.20/...) - solr incl. data dir (path: /Applications/XAMPP/solr/...) For the installation on both system i just used the example in the solr package (copy&paste) and created the .war file. Where are the solr libraries? In the ones under "./tomcat 6.0.20/webapps/solr/WEB-INF/lib/" are no mysql jars not on xp or mac os. Noble Paul നോബിള് नोब्ळ्-2 wrote: > > the mysql driver . I d not remember the exact name of the driver jar file > > On Thu, Jul 9, 2009 at 4:39 PM, gateway0 wrote: >> >> What driver do you mean exactly (filename & path) so I can compare my >> installation on xp and mac os? >> >> >> >> Noble Paul നോബിള് नोब्ळ्-2 wrote: >>> >>> so it says the driver is not present in the classpath. >>> >>> On Thu, Jul 9, 2009 at 4:11 PM, gateway0 wrote: >>>> >>>> Here is the complete error message: >>>> " >>>> type Status report >>>> >>>> message Severe errors in solr configuration. Check your log files for >>>> more >>>> detailed information on what may be wrong. If you want solr to continue >>>> after configuration errors, change: >>>> false in null >>>> - >>>> org.apache.solr.common.SolrException: FATAL: Could not create importer. >>>> DataImporter config invalid at >>>> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:114) >>>> at >>>> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) >>>> at org.apache.solr.core.SolrCore.(SolrCore.java:480) at >>>> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:119) >>>> at >>>> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) >>>> at >>>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) >>>> at >>>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) >>>> at >>>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) >>>> at >>>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800) >>>> at >>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) >>>> at >>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) >>>> at >>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) >>>> at >>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) >>>> at >>>> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) >>>> at >>>> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) >>>> at >>>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) >>>> at >>>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at >>>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) >>>> at >>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >>>> at >>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >>>> at >>>> org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at >>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >>>> at >>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) >>>> at >>>> org.apache.catalina.core.StandardService.start(StandardService.java:516) >>>> at >>>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) >>>> at >>>> org.apache.catalina.startup.Catalina.start(Catalina.java:583) at >>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>> at ja