Could someone try and explain to me what exactly I should do with
- schema.xml
- solrconfig.xml

I keep getting this error. msg whenever I approach the solr search page.
Your schema.xml version is too old. You must update it and re-index your content.

  $status_header = '';
  $solr_msg = $num_docs = $delay_msg = $delete_msg = '';
  if (isset($data->index->numDocs)) {
    try {
      $stats_summary = $solr->getStatsSummary();
      $solr_msg = '<p>' . t('Using schema.xml version: <strong>@schema_version</strong>', $stats_summary);
      // We need a schema version greater than beta3. This is mostly to catch
      // people using the Drupal 6 schema.
      if (version_compare($stats_summary['@schema_version'], 'drupal-3.0-beta3', '<=')) {
        drupal_set_message(t('Your schema.xml version is too old. You must update it and re-index your content.'), 'error');
      }
      if (!empty($stats_summary['@core_name'])) {
        $solr_msg .= '<br />' . t('Solr core name: <strong>@core_name</strong>', $stats_summary);
      }
      $delay_msg = '<br />' . t('<em>The server has a @autocommit_time delay before updates are processed.</em>', $stats_summary) . "</p>\n";
      $delete_msg = '<p>' . t('Number of pending deletions: @deletes_total', $stats_summary) . "</p>\n";
    }
    catch (Exception $e) {
      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
    }
    $status_header .= $solr_msg . $delay_msg;
    $pending_msg = isset($stats_summary['@pending_docs']) ? t('(@pending_docs sent but not yet processed)', $stats_summary) : '';
    $num_docs = '<p>' . t('Number of documents in index: @num !pending', array('@num' => $data->index->numDocs, '!pending' => $pending_msg)) . "</p>\n";
    $status_header .= $num_docs . $delete_msg;
  }

I am running Solr 3.3 and...
What I particularly like to know is.... I need to replace above mentioned files. But there is talk about an example folder.... are we talking about the tomcat solr

I will be happy to attach any files. Tell me which ones please.
Sorry if I am thick for not getting this.

Comments

marco71’s picture

I figured out how to do this. \i guess I should have read before asking.
I followed instructions in this node: http://drupal.org/node/504696
It's for drupal 6.x but things seem to work now.

marco71’s picture

Status: Active » Closed (works as designed)

removed duplicate

yngens’s picture

Status: Closed (works as designed) » Active

Instructions on http://drupal.org/node/504696 are for Drupal 6 whereas this ticket was opened for Drupal 7, where the error persists.

I have a functional Apache Solr Multi-core Setup using Jetty. My Drupal 6 websites with Apache Solr Search Integration module activated function with no issues. However, I needed to activate a Drupal 7 website with the same module activated on the same server. And it actually works with no issues except it's giving the notice in the subject.

I wonder if it is ok at all to have one Jetty for both Drupal6 and 7 installations on the same server? Of course, I copied schema.xml and solrconfig.xml from the module's versions for Drupal 6 and Drupal 7 into the respective conf directories of solr installation.

yngens’s picture

After restarting solr service, the notice disappeared. So the ticket could be closed. But I really hope someone can elaborate on the question if it is ok to have one solr service installed for both Drupal 6 and 7 sites on the same server?

nick_vh’s picture

Status: Active » Fixed

It should be ok if you use the schema for drupal 6 in the drupal 6 solr service and the same with 7. If you however see any issue that you can prove and replicate we could take a closer look.

Thanks for the efforts!

Status: Fixed » Closed (fixed)

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

DerTobi75’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Status: Closed (fixed) » Active

Hi,

sorry for bringing this one up! I read all the issues about this notice, bur cannot get it away!

I installed Apachesolr 3.5, copied all xml files in the conf folder, renamed the schema-solr3x.xml and solrconfig-3x.xml, started the server with java -jar start.jar.

Default Index shows Schema drupal-3.0-solr3, so I guess everything should work, but I still get Your schema.xml version is too old. You must update it to at least drupal-3.0-beta4 and re-index your content.

I am using ApacheSolr 3.5 and Apache Solr Search Integration 1.0!

Best regards,

Tobi

armourymedia’s picture

Having the same issue as #7. (D7.15, Solr 3.5 and apachesolr.module 1.0)

DerTobi75’s picture

The Warning disapeaers, when I using the schema.xml for 3.0, but I cannot index anything.

armourymedia’s picture

It seems that this issue is due to the change in the schema name to "drupal-3.0-solr3". I changed it to "drupal-3.0-rc2-solr3" in both schema.xml and solrconfig.xml and the error goes away. The error message is generated by the apachesolr_status_page function in apachesolr.admin.inc. I'm guessing the following doesn't recognize the new schema name in v1.0.

if (version_compare($stats_summary['@schema_version'], 'drupal-3.0-beta3', '<=')) {
    drupal_set_message(t('Your schema.xml version is too old. You must update it and re-index your content.'), 'error');
}

I'm not familiar enough with the module to offer a patch, but I hope this helps to isolate the issue.

nick_vh’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

Looks like this is a version_compare fail.

Can someone confirm this patch works? I tried it out locally and looks to work for me for all use cases

pwolanin’s picture

Status: Needs review » Needs work

No, let's fix the version string actually.

pwolanin’s picture

Per our earlier discussion, will start by moving files to folders:

diff --git a/solr-conf/protwords.txt b/solr-conf/solr-1.4/protwords.txt
similarity index 100%
copy from solr-conf/protwords.txt
copy to solr-conf/solr-1.4/protwords.txt
diff --git a/solr-conf/schema.xml b/solr-conf/solr-1.4/schema.xml
similarity index 100%
rename from solr-conf/schema.xml
rename to solr-conf/solr-1.4/schema.xml
diff --git a/solr-conf/solrconfig.xml b/solr-conf/solr-1.4/solrconfig.xml
similarity index 100%
rename from solr-conf/solrconfig.xml
rename to solr-conf/solr-1.4/solrconfig.xml
diff --git a/solr-conf/protwords.txt b/solr-conf/solr-3.x/protwords.txt
similarity index 100%
rename from solr-conf/protwords.txt
rename to solr-conf/solr-3.x/protwords.txt
diff --git a/solr-conf/schema-solr3x.xml b/solr-conf/solr-3.x/schema.xml
similarity index 100%
rename from solr-conf/schema-solr3x.xml
rename to solr-conf/solr-3.x/schema.xml
diff --git a/solr-conf/solrconfig-solr3x.xml b/solr-conf/solr-3.x/solrconfig.xml
similarity index 100%
rename from solr-conf/solrconfig-solr3x.xml
rename to solr-conf/solr-3.x/solrconfig.xml
pwolanin’s picture

Title: Your schema.xml version is too old. You must update it and re-index your content. » Fixes for schema.xml version numbering and organization
Version: 7.x-1.0 » 7.x-1.x-dev
pwolanin’s picture

StatusFileSize
new2.26 KB

Here's a version number fix.

pwolanin’s picture

Status: Needs work » Needs review
pwolanin’s picture

StatusFileSize
new4.52 KB

With README changes too

pwolanin’s picture

StatusFileSize
new5.07 KB

Plus test fix (for a test that doesn't run on pifr).

pwolanin’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

committed to 7.x

pwolanin’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new5.5 KB
pwolanin’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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