Needs work
Project:
Apache Solr Search
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Oct 2011 at 01:06 UTC
Updated:
1 Aug 2013 at 00:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
nick_vhCould you please write a writeup on how to replicate this starting from an empty drupal?
I'd suppose you have 2 vocabularies and somehow your vocabulary with vid 2 is not indexing which could explain your error.
We'd have to know how it was possible that you have 2 vocabularies or more and that 1 of them is not indexed before we can try to solve it
Comment #2
gateway69 commentedI ran though ubuntu project mercury install process, that sets up a nice lamp pressflow/varnish/apc/solr (version 1.4.1) then I moved one of our existing sites over
We have 5 vocabs listed.. with various terms, one think to note is we do use taxonomy menu as well, not sure if thats related.
If you can tell me where I could put some debug statements in I can help provide some feedback, but the install process is long and moving over a site took a while and it would be hard to prob do from scratch .. but i would like to help debug the issue.
Comment #3
nick_vhYou could try to debug the apachesolr.index.php file
Try to see which vocabularies are added? Once you have this list you can at least be sure what is being indexed.
Also if you go to the apachesolr admin (http://localhost:8983/solr/core0/admin/schema.jsp) you can see what dynamic fields you have available.
Keep us updated
Comment #4
kevin.dutra commentedWe get these same errors, although we're using 6.x-1.5. You'll see these popping up in server logs if you have PHP configured to report E_NOTICE level errors, or if you're using Drush to do indexing and you have the verbose mode enabled.
The culprit is the line that adds the field to the document (that's line 186 of apachesolr.index.inc in 6.x-1.5):
Since the ".=" operator is being used, the current value is implicitly looked up prior to appending $name, hence the call to __get() in Document.php. The first time a particular vid is encountered, this will cause the error to be generated since it doesn't yet exist in the array of fields. You'd get one of these for each vid in a document, so if you have a reasonably expansive taxonomy set and/or a large number of nodes being indexed, you can get inundated with these errors.
This could be fixed by checking whether the field has been set prior to trying to append. Something along the lines of:
Comment #5
nick_vhCould you provide a patch for this?
Comment #6
kevin.dutra commentedSure, here it is. This is against 6.x-1.x-dev
Comment #7
lazysoundsystem commentedThanks for the patch, Kevin, I can confirm it quietens the errors on 6.x-1.5.
Comment #8
lazysoundsystem commentedAdding here exactly the same patch, but rolled with 'git diff --no-prefix' for use with drush_make.
Comment #9
nick_vhLooking good. Seems enough people reviewed the patch so committed it.
Comment #10
nick_vhComment #11
gateway69 commentedworks for me!
Comment #13
dergachev commentedAlthough the patch in #8 applies cleanly against 6.x-2.x, I re-rolled it anyways.
Tested it, so please consider committing to apachesolr 2.x.
Comment #14
dergachev commentedAnd with the patch, this time.
Also FYI this has been fixed in later versions of SolrPhpClient, see https://code.google.com/p/solr-php-client/source/browse/trunk/Apache/Sol...
Comment #16
dergachev commentedFrom the test log in #15:
Does this imply that the tests in 6.x-2.x are not working? I have a hard time believing my patch could cause this.
Comment #16.0
dergachev commentedadded some more details