-
Notifications
You must be signed in to change notification settings - Fork 290
How to use this repo with Drupal 7 #11
Comments
@mccrodp I agree that an officially-supported Docker image with the Apache Solr Search module's structure, and also an officially-supported Docker image with the Search API Solr module's structure would be nice... as an unofficial maintainer for these Docker images, it would certainly save me some time, since I don't use these modules on every project, so I don't always update my images as fast as the upstream modules change. However, this issue is filed in the queue for the Apache Solr software project itself (a generic search backend written in Java and used by many other pieces of software, two of which are Drupal's Apache Solr Search module, and Drupal's Search API Solr module)... I think the maintainers of those Drupal modules should be the ones providing the official support, not the maintainers of Apache Solr itself. So you'd probably get better results by filing this feature request in those modules' issue queues instead:
Background... Solr is a generic database backend, similar to how MySQL is a generic database backend, and, like MySQL, Solr needs to have a structure created on it before Drupal can use it. Unlike MySQL, however, setting up Solr's structure is a bit more complicated, because you have to save files in a special directory on the filesystem and restart the server (as opposed to MySQL where you can set up a structure by running To make things more complicated, the Drupal ecosystem has a few different modules, mainly Apache Solr Search, and Search API Solr, each of which can allow Drupal to use Solr as it's search backend. But the Solr structure that the Apache Solr Search module needs is incompatible with the Solr structure that the Search API Solr module needs, similar to the way that Backdrop and Drupal 8's MySQL database structures are incompatible. Likewise, the data structure used by these modules changes with each version of the module, similar to how Drupal 7's database structure differs from Drupal 8's database structure. |
Really appreciate this detailed response @mparker17, that really clarifies things from many angles. Yes, it makes complete sense that the Apache Solr Drupal module maintainers are the ones pushing forward with integrations, but I guess if they had time they would be doing this also. I guess it's a similar case to the jQuery version being used in Drupal core, always a few steps behind to ensure compatibility. It is just unfortunate in this case that it blocks using the latest version and even this supported (generic) repo. Drupal is gaining corporate momentum (which I guess is good and bad), so perhaps a company will come along and start being the official maintainers for something like this and they'll get to put their logo beside it 😉 Thanks for your work and help! |
@mparker17 said:
I agree. The docker-solr image is just a generic Solr distribution for Docker, with as little deviation from the upstream Apache Solr project as possible. We won't be adding consumer-specific extra configuration. Consumers of Solr should where possible use the Solr APIs and commands to create their desired configuration, rather than rely on config and custom images, so they can treat Solr as a black box that is then easier to upgrade. I see in Drupal Apache Solr Search module documentation that is uses config files; you might find this comment useful as an example of how to modify configuration. Another option may be to create a shell script that makes the required modification and then invokes Solr -- then make that script available to the container with a volume, and execute it instead of the default |
@makuk66 Thanks for this. While it is certainly helpful as a reference for myself for future it will also help others with more knowledge than me. My knowlege of Solr is somewhat limited, but growing, gradually. I wonder is there potential for Drupal to interface directly with the Schema API then, perhaps in a Solr Schema API Drupal module, allowing for config through PHP or even a UI using a REST service or something to update the schema on the server Solr resides on. This may not be practical, but if it were, it could help the less Solr-savvy Drupal devs. I guess you'd have to be able to issue a restart of the Solr server from this UI then also, if so maybe it's not ideal in some ways. |
With the latest version of docker-solr you can now do something like:
Alas that solr-4 config is not compatible with Solr 6, so you get error messages and no core. Fixing that config looks to be tracked upstream https://www.drupal.org/node/2453855 and https://www.drupal.org/node/2442077.
and that loaded. But I've not tried actually using it from Drupal container. In any case, I don't think there's anything here to be done in docker-solr, so I'll close this bug. |
@makuk66 how can you achieve that in a docker-compose file? |
Perhaps:
|
@makuk66 Thanks a lot. I think I'm still don't fully understand entrypoint, I will check this out. |
@gagarine the differences between Essentially, if you recall the syntax for the
... using
... if you want to override the You might find it helpful to think of Dockerfiles without |
@mparker17 I think I got it, I will adapt my configurations accordingly. Thanks for your help. |
I saw this issue on Drupal #4 and wondering if it is possible to use this with the Drupal 7 module: https://www.drupal.org/project/apachesolr
It looks as though only 1.4 and 4.x versions are supported and I only see 5.x versions in this repo.
I was trying to get a
docker-compose
to integrate with your deprecated repo makuk66/docker-solrWhich points to the repo and Dockerfile here using this deprecated solr container:
Anyway, I was getting a few errors when I build the machine which I posted on the associated repo: mparker17/docker-solr-apachesolr#1 and this made me wonder why official support for Drupal compatible Solr version seems unavailable. Thanks.
The text was updated successfully, but these errors were encountered: