Setting "Solr Home" via JNDI on Tomcat Bundled with JBoss
Hello. I apologize in advance if I've overlooked something obvious, but I've been trying for over a day to setup Solr to run on the Tomcat 5.5 that's bundled with JBoss AS 4.0.5 GA. There is plenty of help on the Solr Wiki about setting it up on Tomcat 5.5 Standalone, but no help on Tomcat 5.5 Bundled. Ideally, it should be a similar process, but it doesn't seem to be. Tomcat Bundled is quite different from Tomcat Standalone. There is no "webapps" deployment folder or "\conf\Catalina\localhost" config folder, as referred to on the "Solr Tomcat" wiki page, and in fact the entire folder structure is quite different, due to JBoss' treatment of Tomcat as just another service. I've actually gotten past all of the hurdles, except for figuring out how to setup "Solr Home" via JNDI so that Tomcat Bundled will see the binding. I have tried various approaches: 1. Based on instructions at "http://wiki.apache.org/solr/SolrTomcat";, I created an XML fragment: and tried placing it in various promising places: - jboss-4.0.5.GA/server/default/deploy//META-INF/context.xml - jboss-4.0.5.GA/server/default/deploy//META-INF/solr.xml - jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/context.xml - jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/solr.xml - jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/conf/context.xml - jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/conf/solr.xml 2. Based on instructions at "http://wiki.jboss.org/wiki/Wiki.jsp?page=JNDIBindingServiceMgr";, I copied the sample JNDIBindingServiceMgr , and customized it with the following JNDI binding: C:\Dev\MyTestSolrHome and tried placing it in "jboss-4.0.5.GA\server\default\conf\jboss-service.xml", under the "JNDI" section. None of these approaches worked, and during Solr startup I still get the following in the logs: == 16:56:33,532 ERROR [STDERR] Mar 21, 2007 4:56:33 PM org.apache.solr.servlet.SolrServlet init INFO: SolrServlet.init() 16:56:33,532 ERROR [STDERR] Mar 21, 2007 4:56:33 PM org.apache.solr.servlet.SolrServlet init INFO: No /solr/home in JNDI 16:56:33,532 ERROR [STDERR] Mar 21, 2007 4:56:33 PM org.apache.solr.servlet.SolrServlet init INFO: user.dir=C:\Dev\jboss-4.0.5.GA\bin 16:56:33,610 ERROR [STDERR] Mar 21, 2007 4:56:33 PM org.apache.solr.core.Config getInstanceDir INFO: Solr home defaulted to 'solr/' == Can anyone please help? Thanks, -Dan -- View this message in context: http://www.nabble.com/Setting-%22Solr-Home%22-via-JNDI-on-Tomcat-Bundled-with-JBoss-tf3448553.html#a9617997 Sent from the Solr - User mailing list archive at Nabble.com.
Solr finding doc by one field but not by another
Hi everyone. Can anyone explain how this might happen? I query by the "ID" field and get the following result: = 0 16 ID:ee483237-399c-4b17-ad73-000cc54fd3e1 COSMEO US ee483237-399c-4b17-ad73-000cc54fd3e1 en-US Social Studies American History Historical Periods Expansion and Reform 1801-1861 Territorial Expansion EncyclopediaArticles 2005 Pony Express was a mail service operating between Saint Joseph, Mo., and Sacramento, Calif., inaugurated on April 3, 1860, under the direction of the Central Overland California and Pike's Peak Express Co. True Pony Express pony express = Then I query by the "title" field from the result above (so I know the document is in the index and has been committed), and I get zero results: = 0 0 title:"Pony Express" = "ID" is not the only field that I can find the doc by. Searching for "Type:encyclopediaarticles" finds it too. Also, "title" is not the only field that misses the doc. A search by "vocabulary" misses it too. I haven't tried all the fields yet to see exhaustively which ones find it and which ones don't. I can do that if it would help. For what it's worth, I started with an existing Lucene index and modified Solr's schema.xml so that I could just use the Lucene index in Solr. That Lucene index had about 230K docs. I then used your "post.jar" to post another 10K docs to the index after starting up the server. Those 10K docs only had 7 of the 30 fields that the original 230K docs had. Could that be the problem? I am noticing that the docs that I'm having problems with are from the original 230K-doc index, not from my subsequent 10K-doc post. The 10K docs seem to be findable by any of their 7 fields. Here are my config files: http://www.nabble.com/file/7488/schema.xml schema.xml http://www.nabble.com/file/7489/solrconfig.xml solrconfig.xml Any help is greatly appreciated. Thanks, -Dan -- View this message in context: http://www.nabble.com/Solr-finding-doc-by-one-field-but-not-by-another-tf3481287.html#a9716918 Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr finding doc by one field but not by another
Mike Klaas wrote: > > This is almost certainly due to a mismatch between the index- and > query-time analysis of the fields. For instance, your schema defines > the title field to be "string" (unanalyzed), but it is likely that > some tokenization (perhaps via StandardAnalyzer) occurred in the > original index. > Yep, that was exactly the problem. I changed all of my field types from "string" to "text", and things still didn't work right when querying. So I asked the guy who created the Lucene index what analyzers he used, and he had used the StandardAnalyzer, whereas my Solr configuration was using the default advanced analyzer setup that Solr comes with in schema.xml. So I changed my schema.xml to use just StandardAnalyzer, and the searches now seem to be returning expected results. -Dan -- View this message in context: http://www.nabble.com/Solr-finding-doc-by-one-field-but-not-by-another-tf3481287.html#a9761451 Sent from the Solr - User mailing list archive at Nabble.com.