Solr is installed without Tomcat and is up at http://localhost:8983/solr (at http://localhost:8983/solr/admin I see the interface) but after few cron runs I see no results at admin/settings/apachesolr/index.

Trying to search at search/apachesolr_search I got a Drupal status error:

The Apache Solr search engine is not available. Please contact your site administrator.

Looking in Drupal logs I saw 2 errors:

  • "400" Status: ERRORunknown_field_site - this appear after Adding 200 documents message
  • "0" Status: Communication Error

Platform:

  • Drupal 5.19
  • apachesolr 5.x-1.0-alpha6
  • Solr 1.3 (without Tomcat) - up at http://localhost:8983/solr
  • At admin/settings/apachesolr settings are correct
  • schema.xml & solrconfig.xml were copied to conf

What else?

Thanks.

Comments

claudiu.cristea’s picture

One Addition:

In fact is Solr 1.4 (from nightly devel build at http://people.apache.org/builds/lucene/solr/nightly/solr-2009-08-20.zip) but in admin is showing up Solr Specification Version: 1.3.0.2009.08.20.08.05.52

Looking in admin/logs/status I have an OK message:

ApacheSolr	Solr can be pinged.
 * Host: localhost
 * Port: 8983
 * Path: /solr
claudiu.cristea’s picture

Tracing the error reveal that I get an "400 Bad request" error when trying to send data to the indexer. Here's the response ($response = new Apache_Solr_Response() - from Service.php):

Apache_Solr_Response Object
(
    [_rawResponse:protected] =>
    [_httpStatus:protected] => 400
    [_httpStatusMessage:protected] => ERRORunknown_field_site
    [_type:protected] => text/html
    [_encoding:protected] => iso-8859-1
    [_isParsed:protected] =>
    [_parsedData:protected] =>
    [_createDocuments:protected] => 1
    [_collapseSingleValueArrays:protected] => 1
)
claudiu.cristea’s picture

I fixed the 400 error on indexing -- Solr was started with some bad params and he failed to load the proper schema.xml so he didn't recognize Drupal fields sent along the request... Now the site get indexed on each cron.

Unfortunately, the search The Apache Solr search engine is not available. Please contact your site administrator still pops up on Solr Search at search/apachesolr_search along with the watchdog error message "0" Status: Communication Error

claudiu.cristea’s picture

Finally found the issue. Our site uses a lot of CCK fields. Due to this the GET request size was bigger than 7,900 characters (!!!) because of " faced.field=XXXXXXX" pairs created for each field... Solr/Jetty settings were adjusted and it works now.

However, I saw in 6.x that facets can be limited through user interface... That would be a very useful feature in 5.x too... Is there an ongoing process to backport features from 6.x?

robertdouglass’s picture

Status: Active » Fixed

Thanks for reporting the resolution. I've run into the GET request size limit as well.

I responded on your other issue about the state of DRUPAL-5. The short answer is, no effort is being made to backport. You are encouraged to lead such an effort, however.

(changing status to fixed)

Status: Fixed » Closed (fixed)

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

q0rban’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Active

I've run into this as well, except with Tomcat. I upped the maxHttpHeaderSize attribute in the HTTP Connector element in my server.xml file, but to no avail, I still get error on the search page saying

The Apache Solr search engine is not available. Please contact your site administrator.

The status page reports:

Apache Solr	Your site has contacted the Apache Solr server.

    * Host: localhost
    * Port: 8180
    * Path: /solr
q0rban’s picture

Using drush solr search test resulted in this error:

Fatal error: Uncaught exception 'Exception' with message '"400" Status: Bad Request<html><head><title>Apache Tomcat/6.0.20 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - undefined field nodeaccess_7c340e745d20_all</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>undefined field nodeaccess_7c340e745d20_all</u></p><p><b>description</b> <u>The request sent by the client was syntac in sites/all/modules/apachesolr/Drupal_Apache_Solr_Service.php on line 266
q0rban’s picture

Status: Active » Fixed

Ok, I was able to get rid of the errors by disabling the apachesolr_nodeaccess module.

Status: Fixed » Closed (fixed)

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

janusman’s picture

Status: Closed (fixed) » Closed (duplicate)
janusman’s picture

See http://drupal.org/node/443980 for a possible fix.