0

I'm using Drupal 8 with Search API and Search API Solr Search.

I'm tasked with making an existing Solr installation searchable within Drupal. This core indexes PDFs and serves other systems, thus I may not edit the schema there. It can be assumed that this schema has fields like "author", "title" and "abstract".

I tried the following:

  • Add a server in Search API: This seems to work as I see the (correct) number of indexed documents in Solr.
  • Add an index with "Solr Document" as data source. I can see fields from the Solr core here.

However, in the View tab, I always see "0/0 Indexed".

Am I missing something here or is perhaps the wrong approach?

1 Answer 1

0

The Solr core's schema must have a field "index_id" and the value must be the same as the machine name of the Drupal index (in order for that (Drupal) index to find it). Moreover, the (Drupal) server has to use "Any Schema" and the (Drupal) index must be read-only.

Note that under "View" it still says "0/0 Indexed", however the search works.

There is a datasource.md in the search_api_solr module's folder which was helpful. I found it helpful to use search_api_devel as it shows the queries to Solr.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.