Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2011 at 18:58 UTC
Updated:
6 Mar 2011 at 10:11 UTC
In a solr based index, if I go to the status page and do "Index Now", I get a blank page.
No error message, no long entry in the "Recent log messages".
Obviously, the index is not working.
Maybe something worth mentioning - I am using a postgres database.
Modules:
Chaos tools 7.x-1.x-dev
Entity API 7.x-1.0-beta3
Comments
Comment #1
drunken monkeyPlease update Entity API to the latest release (Beta 6) or development snapshot and see, if the problem persists.
Sadly, there are a lot of incompatibilities between different versions of the two modules.
If you are using a Solr server, the database type shouldn't have any effects.
Comment #2
gister commentedThank you for the prompt answer. I apologize, I meant Entity API 7.x-1.0-beta6. I also tried the development snapshot (which I used previously) with no success.
Any other suggestions? At least if we could see an error log entry...
If I am not going too far - is there any way I could help? I am a new to the Drupal/ php development, but I am not new to programming. And I am very interested in the findability features exposed in Drupal.
Thank you,
Mihai
Comment #3
drunken monkeyOh, OK, this is bad.
I can't reproduce this (everything works here for me), so yes, I will need your help for finding the bug.
First: Have you set Drupal to display all messages (at "admin/config/development/logging")? Maybe there would be an exception displayed but is blocked by your settings. (Even though that should definitely be logged in any case, so this is probably not the case.)
Other things to consider are whether Solr is running, with the appropriate configuration files, and whether you installed the SolrPhpClient library correctly (although I guess that all this is the case).
Then: Does this also occur if you move the index to a database server? If so, does it occur if you deactivate the index' data alterations and processors?
Since probably none of this will pinpoint the bug exactly, you'd then have to insert some
debug()calls in the workflow (or use some other debugging measure) to find the place where the error is triggered. But before doing this, we should probably wait what the above steps show.Comment #4
gister commentedI went to "admin/config/development/logging", it is set to log all the messages (I guess this is the default value, since I never touched it).
Not sure if this is relevant, but I noticed few log entries, all occurring in a time span when Drupal was idle:
- [three occurences:] Warning: Invalid argument supplied for foreach() in SearchApiAlterAddFulltext->alterItems() (line 76 of [...]\modules\search_api\includes\callback_add_fulltext.inc).
- [this is an error:] SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "n.status" in apachesolr_cron
I have Solr running (the Seach API Server entity reports that "the server could be reached"). I think I made a proper install of Solr server, Drupal's Apache Solr module and SolrPhpClient. It is not the first time when I am setting up the Drupal + Solr environment (although, of course, I cannot guarantee that everything is perfect :D ).
If I tie the index to a "database server" everything works fine, as I've seen in your demo.
I guess you should guide me through the debugging process. I never did this, but - like I said - I am ready to learn. Please feel free to send me any URLs to study if you think it will save time...
Comment #5
drunken monkeyWow, great to see someone so eager to learn! ;)
However, now that you mention that you are using the apachesolr module, too, please try one other thing and disable that module. As can be seen in #1032848: Store SolrPhpClient in Libraries folder, the two modules sadly don't really work well together, at the moment …
Have you installed SolrPhpClient in two different places, for both modules? If this is the case, and deactivating the apachesolr module really solves the problem, you can probably just replace the SolrPhpClient files for the apachesolr module with empty files (just the four .php files should suffice). As long as the search_api_solr module is enabled, this should work fine.
Comment #6
gister commentedYou were right! The SolrPhpClient was the culprit, although it wasn't installed in two places, it was installed only inside the "modules\apachesolr" folder. I moved the SolrPhpClient folder inside "modules\search_api_solr" (along with checking/ unchecking components in the modules page).
Now I can do the reindexing of the solr-based index (WOO HOO!!!) and I can also set the facets. But as l changed the index from database to solr, the view based on the index no longer works (per your demo). But I guess this is a different issue (I am not very experienced with views).
One suggestion - maybe I am not the only one that missed the SolrPhpClient issue, I am thinking if this workaround can get more visibility among the issues/ topics pertaining to Search API...
Thank you very much for your help and good luck!
P.S. As I already said, please let me know if there is any way I could help you.
Comment #7
gister commentedI have played with the view and the search page with no success. Facts:
- The Solr server can be added with no problems [The Solr server could be reached (latency: 4.402978515625 ms)]
- The Solr based index can be created and indexing runs fine
- If I go to the Solr web browser page (http://localhost:8983/...), the word I am trying to search for will return results
- The Search API search page based on the (solr based) index gives me "Your search yielded no results" when searching for the same word as above.
- No success with the view either (but I guess this is not relevant since I assume that the closest thing to Solr is the Search API search page)
- No errors in the log
Any suggestions?
Do you want me to create another Issue for this?
Comment #8
drunken monkeyYou're right, good suggestion – I now mention it on the Solr backend module page. I hope, that way others will be able to avoid this caveat.
Regarding your search problems: if you are searching just a single word, the only thing I could imagine going wrong is that you are searching the wrong fields. Did you configure the search page (and the view) to search all fulltext fields, or just some of them? You could also inspect the Solr log to find out the query Solr receives, and what might be wrong about it (most important here are probably the qf parameters).
If this doesn't solve your problems, then yes, please do open a different issue and mark this one as fixed.
Comment #9
drunken monkeyIf the issue is still present, please re-open with additional information, or open a new issue.