On admin/config/search/search_api/index/resource_search/status when clicking Index Now I get the following error
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 332 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 333 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 332 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 333 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 332 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 333 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 332 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Notice: Undefined index: search_api_access_node in SearchApiDbService->indexItem() (line 333 of /usr/local/wwwdocs/toolkit3/sites/all/modules/search_api_db/service.inc).
Couldn't index items. Check the logs for details.
The log says
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (item_id = '310')' at line 1
and the index isn't run.
Appreciate any help with this.
Thanks
Comments
Comment #1
ajaysolutions commentedI am getting this same issue when i've enabled the node access data alteration, although i think the way it behaves that it's to do with having the node access field indexed rather than the data alteration itself...
It's annoying because I can't currently stop nodes being indexed if I simply unpublish them so they still show up
Comment #2
agoradesign commentedI also have this problem. A few months ago I reported this problem: http://drupal.org/node/1351436
I think, both problems have the same root.
I was able to trick the system by doing the following:
Voila, the index table is now created :)
Comment #3
finex commentedThe workaround suggested by @agoradesign works fine :-)
Thanks!
Comment #4
Kvart commentedDon't know if this is right place to ask, but lets try. I was able to create the index table with workaround suggested by @agoradesign (thanks), but unpublished nodes still show up in search results. Is there any way to fix this?
Comment #5
agoradesign commentedYou're welcome :)
@Kvart: If you're only seeing unpublished but not published nodes, I think I know the problem: there is/was a bug in Entity API, reversing the node status. In rc1 it still happens, in the latest dev it's already fixed. Here's the issue with patch included: http://drupal.org/node/1344056
Comment #6
Kvart commentedActually my problem was that both published and unpublished nodes were displayed in search results (i'm using search pages). Even a guest could see unpublished nodes in search results.
I made a really simple modification to fuzzy search's code to prevent that, and it's enough for me until there is a better solution.
Comment #7
Traverus commentedI had the same issue and the work-around also worked for me, but I would think this is a bug, no?
Furthermore, if this is breaking content permissions and you want to now protect something that was previously unprotected, I'd say this is a pretty big issue.
Comment #8
pgrond commentedJust as a confirmation, the workaround worked for me too.
Comment #9
ken hawkins commentedSame problem here and the workaround solution in #2 by agoradesign worked to resolve.
Comment #10
drunken monkeyThanks for reporting this!
This was pretty difficult to debug, but I finally figured it out. Please test the attached patch and see if it reliable fixes all problems.
Comment #12
mxh commented#10 did not work for me, have still the same problem.
After applying #2 it worked. Then I disabled the node access alteration and it also still works now.
Comment #13
drunken monkeyNow that it works, can you still cause the problem, even after applying #10?
Everyone: For testing the patch in #10, please re-save the Fields form and then see whether enabling/disabling the "Node access" data alteration correctly adds/removes the search_api_access_node field.
Comment #14
moniuch commented#10 did not work for me. Getting all variety of "link 332/333" errors, such as:
Re-installed, cleared cache. Nothing helps.
Comment #15
dmadruga commented#2 works like a charm.
#10 doesn't work.
Comment #16
mxh commentedYes, it also works for me after applying #2 and then applying #10.
Comment #17
drunken monkey@ #14: Can you please also try (after applying the patch) to disable and then re-enable the data alterations? It definitely works for me, I can't really explain why this doesn't seem to be the case for anyone else …
@ #15: Please elaborate a bit on "doesn't work". Did you test by applying the patch and afterwards enabling the data alteration?
Comment #18
mustanggb commentedApplying #10 then doing http://drupal.org/node/1347438#comment-5276694 seems to have worked so far.
Comment #19
Sborsody commentedI was getting "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (item_id = '10')' at line 1"
and the database table for node title in the default index that comes with fuzzysearch was empty (for any fulltext field actually).
Here's what I did.
- Apply the patch from #10 to search_api
- Disable then uninstall fuzzysearch
- Enable fuzzysearch
- Go to status page and index (doesn't index anything)
- Go to the fields form for the default fuzzysearch index and hit save
- Go to status page and index
- I see the database table for title field being populated.
So in addition to this there needs to be something changed in fuzzysearch so that it's default index works out of the box.
Comment #20
drunken monkeySince the patch in #10 seems to solve the problem at least for some users, I now committed it. Thanks for testing!
Comment #21
nathan_czh commented#10: 1414138--data-alteration-fields-not-correctly-added-9.patch queued for re-testing.
Comment #23
marcoka commentedchecking...
1.) created a clean drupal 7.15 with basic modules views, ctools and search api/search api db and dependencys
2.) created 2 taxonomies with some terms
3.) created a content type Article and added 2 vocab fields
4.) created two test Articles with some tags
5.) Added an aggregated field where i chose the "term ids" of the two created vocabs
applied patch
ERROR
LOG CHECK:
second test, downloaded latest search api and search api db DEVELOPMENT versions. same error
Comment #24
alauzon commentedI have the same problem.
Undefined index: search_api_url in FuzzySearchService->indexItem()
Comment #25
awolfey commentedThis has already been committed. Also, I confirmed it works in fuzzysearch, so problems above are not related to the original issue. Changing to fixed and leaving for Drunken Monkey to close. Thanks!