Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying search_api for the first time (been using apachesolr until now), and for some reason I'm unable to get data written to the Solr index. I've completed the following steps:
- Created a solr core on my machine
- Installed search_api, search_api_solr, search_api_pages
- Created a Solr server (admin/config/search/search_api/add_server)
- Created a index for the Solr server (admin/config/search/search_api/add_index) that indexes nodes
- Created node content
- Indexed content at admin/config/search/search_api/index/my_index/status, and I get the message that all content has been indexed
However, when I do a search, I get no results, and in looking at the Solr UI itself, there is no content there. I've also run cron, but that doesn't make a difference. Is there something else I'm missing?
Thanks.
Comments
Comment #1
wonder95 CreditAttribution: wonder95 commentedAs an additional note, perms on the server are not an issue. I've verified that the data directory for the solr core allows writing.
Comment #2
holtzermann17 CreditAttribution: holtzermann17 commentedThe same issue applies for me -- I followed the same steps as above. I can confirm that Apache Solr search is working via http://sitename/search/site -- I have Apache Solr search enabled as the active, default, search on admin/config/search/settings, but it's not working with the Search API.
It's also not clear to me why I have to create a new index to use the Search API. Is there some way to use the existing index? I ask partly because I've put some work into making sure the content in the existing index is handled correctly -- but also because that index clearly works!
This ticket http://drupal.org/node/1635812 says
And looking in INSTALL.txt for search_api_solr, it says
My only concern is that, since I'm already using Apache Solr for my main search engine, switching configurations in mid-stream might cause some problems. It would be great if this was a little clearer.
Comment #3
holtzermann17 CreditAttribution: holtzermann17 commentedOK, I've now tried another module (apachesolr_views) that integrates directly with the apachesolr module.
I think I see two "documentation bugs" here.
Finally, think it would be really useful to have a link to apachesolr_views from this module's homepage, and explain the strengths and weaknesses of both.
Comment #4
scor CreditAttribution: scor commentedafaik, you can't share the same solr index between apachesolr and search_api_solr, you need a separate solr index for each (in your actual solr server). If you want to use the same instance of solr, you can set it up as multicore and give a core for apachesolr and another one for search_api_solr. I know this approach works since I use it several sites, where each site has apachesolr and search_api_solr hitting the same solr instance but each their own core. Does that help?
Comment #5
holtzermann17 CreditAttribution: holtzermann17 commented@scor: Thanks, the multicore approach sounds cool, but so far it seems the other apachesolr_views model seems to work for my need at the moment, with comparably less effort.
I do think some clarification to the docs would for help future users make good/useful choices.
Comment #6
vlad.dancerJust confirm that this happens for me, but with one different thing - solr located on acquia search service.
I tried to switch solr seach config from admin account to search-api-1.0 config.
Search api tells me that all nodes indexed but when try to search it returns we empty results.
Maybe someone know what i missed?
Comment #7
legolasboThis issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.