Hi, I only read the short story. :) Note that you should post questions like this on solr-user@lucene list, which is where I'm replying now.
Since you are just starting with Solr, why not grab the recently released 3.1? That way you'll get the latest Lucene and the latest Solr. Otis ---- Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ ----- Original Message ---- > From: RichSimon <richard_si...@hms.harvard.edu> > To: solr-...@lucene.apache.org > Sent: Mon, April 11, 2011 10:36:46 AM > Subject: Solr 1.4.1 compatible with Lucene 3.0.1? > > > Short story: I am using Lucene 3.0.1, and I'm trying to run Solr 1.4.1. I > get an error starting the embedded Solr server that says it cannot find the > method FSDirectory.getDirectory. The release notes for Solr 1.4.1 says it is > compatible with Lucene 2.9.3, and I see that Lucene 3.0.1 does not have the > FSDirectory.getDirectory method any more. Dorwngrading Lucene to 2.9.x is > not an option for me. What version of Solr should I use for Lucene 3.0.1? > (We're just starting with Solr, so changing that version is not hard.) Or, > do I have to upgrade both Solr and Lucene? > > Thanks, > > -Rich > > Here's the long story: > I am using Lucene 3.0.1, and I'm trying to run Solr 1.4.1. I have not used > any other version of Lucene. We have an existing project using Lucene 3.0.1, > and we want to start using Solr. When I try to initialize an embedded Solr > server, like so: > > > String solrHome = PATH_TO_SOLR_HOME; > File home = new File(solrHome); > File solrXML = new File(home, "solr.xml"); > > coreContainer = new CoreContainer(); > coreContainer.load(solrHome, solrXML); > > embeddedSolr = new EmbeddedSolrServer(coreContainer, SOLR_CORE); > > > > [04-08 11:48:39] ERROR CoreContainer [main]: java.lang.NoSuchMethodError: >org.apache.lucene.store.FSDirectory.getDirectory(Ljava/lang/String;)Lorg/apache/lucene/store/FSDirectory; >; > at >org.apache.solr.spelling.AbstractLuceneSpellChecker.initIndex(AbstractLuceneSpellChecker.java:186) >) > at >org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:101) >) > ; at >org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:56) >) > at >org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:274) >) > ; at > org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:508) > at org.apache.solr.core.SolrCore.(SolrCore.java:588) > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:428) > at org.apache.solr.core.CoreContainer.load(CoreContainer.java:278) > > > Looking at Google posts about this, it seemed that this can be caused by a > version mismatch between the Lucene version in use and the one Solr tries to > use. I noticed a Lucene version tag in the example solrconfig.xml that I’m > modifying: > > LUCENE_40 > > I changing it to LUCENE_301, changing it to LUCENE_30, and commenting it > out, but I still get the same error. Using > LucenePackage.get().getImplementationVersion() shows this as the Lucene > version: > > Lucene version: 3.0.1 912433 - 2010-02-21 23:51:22 > > I also printed my classpath and found the following lucene jars: > lucene-analyzers-3.0.1.jar > lucene-core-3.0.1.jar > lucene-highlighter-3.0.1.jar > lucene-memory-3.0.1.jar > lucene-misc-2.9.3.jar > lucene-queries-2.9.3.jar > lucene-snowball-2.9.3.jar > lucene-spellchecker-2.9.3.jar > > The FSDirectory class is in lucene-core. I decompiled the class file in the > jar, and did not see a getDirectory method. Also, I used a ClassLoader > statement to get an instance of the FSDirectory class my code is using, and > printed out the methods; no getDirectory method. > > I gather from the Lucene Javadoc that the getDirectory method is in > FSDirectory for 2.4.0 and for 2.9.0, but is gone in 3.0.1 (the version I'm > using). > > Is Lucene 3.0.1 completely incompatible with Solr 1.4.1? Is there some way > to use the luceneMatchVersion tag to tell Solr what version I want to use? > > > -- > View this message in context: >http://lucene.472066.n3.nabble.com/Solr-1-4-1-compatible-with-Lucene-3-0-1-tp2806828p2806828.html > > Sent from the Solr - Dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > >