Some searches of the form [a-z]+\.[a-z]+ return an error ("The Apache Solr search engine is not available. Please contact your site administrator.")

I noticed this when testing apachesolr_autocomplete but got the same message when that module was disabled. I also see this error when searching directly from the solr admin interface at http://HOST:8080/solr/CORE/admin/

To test this I created 100 nodes using devel_generate. Searching for "sagaciter.jugis" or "sagacit.jugi" results in an error, but a search for "sagaci.jugi" succeeds. Reproduced using Apache Solr Search Integration 6.x-1.2 and 6.x-2.0-beta3 on separate SolR cores with Tomcat 6.0.28-2ubuntu1 and solr-tomcat 1.4.0+ds1-2ubuntu1.

Error message from tomcat below:

HTTP Status 500 - org/apache/lucene/index/memory/MemoryIndex java.lang.NoClassDefFoundError: org/apache/lucene/index/memory/MemoryIndex at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getReaderForField(WeightedSpanTermExtractor.java:361) at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extractWeightedSpanTerms(WeightedSpanTermExtractor.java:282) at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:230) at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:158) at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms(WeightedSpanTermExtractor.java:414) at org.apache.lucene.search.highlight.QueryScorer.initExtractor(QueryScorer.java:216) at org.apache.lucene.search.highlight.QueryScorer.init(QueryScorer.java:184) at org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:226) at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:335) at org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:89) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1317) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:636)

Comments

geewiz_’s picture

We had the same problem today and I tracked the reason down. It's an omission in the Ubuntu Solr packages. There's a library symlink missing that you can set as follows:

 $ cd /usr/share/solr/WEB-INF/lib
 $ ln -s ../../../java/lucene-memory.jar

Restart your application server and the error should be gone.

Best regards,
Jochen

pwolanin’s picture

Status: Active » Fixed
mvc’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dawansv’s picture

I actually had the same problem on Ubuntu 10.04 BUT with ANY search using double quotes.

Fix in #1 fixed the problem. Just mentioning it in case it helps somebody else because I am sure glad I found this post!

jpmckinney’s picture

Category: bug » support
mvc’s picture

for reference, i had no response from ubuntu, so i filed it upstream: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618802

manasiv’s picture

The solution #1 works great ! Thanks.

drupal_jon’s picture

Thanks Jochen,

This also solved the same issue when searching for text that includes quote marks or words with numbers in them (e.g. ABC999)