I am using this module on a site which has content types without the standard title and body fields. When these are indexed, the following error is thrown:
Notice: Undefined index: title in ApacheSolrDocument->__get() (line 313 of D:\Projects\Foo\site\www\sites\all\modules\vendor\apachesolr\Apache_Solr_Document.php).
It appears that these fields are assumed to be present. Looking at the D6 version of the module I see this:
// use language specific stemming and so on ..
if (isset($document->title)) {
$document->{'title_' . $language} = $document->title;
}
if (isset($document->body)) {
$document->{'body_' . $language} = $document->body;
}
has turned into this in the D7 port:
// use language specific stemming and so on ..
$document->{'title_' . $language} = $document->title;
$document->{'body_' . $language} = $document->body;
Was there any reason behind this simplification?
Comments
Comment #1
andymantell commentedThe attached patch simply reinstates the isset() tests from the D6 version.
Comment #2
andymantell commentedJust looking through this patch:
http://drupal.org/files/issues/1248428-2-apachesolr_multilingual-update_...
and found that it uses this instead:
Not sure which is right now...
Comment #3
firebird commentedSince the latest version of ApacheSolr uses "label" and "content", I'm guessing Multilingual should follow suit.
Here's a patch that does the necessary changes to apachesolr_multilingual. It also includes patch 1248428-2. The rest of the changes in the patch have to do with trying to get multilingual compatible with SOLR 3.4.
With these changes, I seem to manage to run SOLR search, index site content and do searches without huge lists of error messages.
Comment #4
mkalkbrennersee #1702354: Apache Solr Multilingual 7.x Roadmap