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:

  1. Created a solr core on my machine
  2. Installed search_api, search_api_solr, search_api_pages
  3. Created a Solr server (admin/config/search/search_api/add_server)
  4. Created a index for the Solr server (admin/config/search/search_api/add_index) that indexes nodes
  5. Created node content
  6. 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

wonder95’s picture

As an additional note, perms on the server are not an issue. I've verified that the data directory for the solr core allows writing.

holtzermann17’s picture

Category: support » bug

The 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

Did you use the Search API config files for the hosted Solr server?

And looking in INSTALL.txt for search_api_solr, it says

Before starting the Solr server you will have to make sure it uses the proper configuration files. These are located in the solr-conf/ directory in this module, in a sub-directory according to the Solr version you are using. Copy all the files from that directory into Solr's configuration directory ($SOLR/example/solr/conf/ in case of the example application), after backing up all files that would be overwritten.

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.

holtzermann17’s picture

Component: Miscellaneous » Documentation

OK, I've now tried another module (apachesolr_views) that integrates directly with the apachesolr module.

I think I see two "documentation bugs" here.

  1. This module's project page currently says "The backend uses, like the popular Apache Solr Search Integration module, Apache Solr servers for indexing and searching content." But it doesn't say that the two modules are actually mutually exclusive (or, if they're not, there's not an indication about how to get them working together in parallel).
  2. the INSTALL.txt does say that a new Apache Solr configuration is needed, but I thought I could use my existing configuration. So, INSTALL.txt should also make it clear that this module will NOT work out of the box with an existing, working, configuration from the apachesolr module.

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.

scor’s picture

afaik, 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?

holtzermann17’s picture

Component: Documentation » Miscellaneous

@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.

vlad.dancer’s picture

Just 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?

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This 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.