Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions for ddev-drupal-solr and Drupal 7 #44

Open
jenlampton opened this issue Dec 12, 2024 · 10 comments
Open

Instructions for ddev-drupal-solr and Drupal 7 #44

jenlampton opened this issue Dec 12, 2024 · 10 comments

Comments

@jenlampton
Copy link

I expect there will be a handful of larger Drupal 7 sites suddenly getting attention now that EOL draws near. Could we add some docs on how to get Drupal 7 + Search API running with this add-on? I have not figured it out yet, but if/once I do I'll be happy to file a PR against the README if interested.

@tyler36
Copy link
Collaborator

tyler36 commented Dec 12, 2024

For context, Drupal 7 is EOL on 05 Jan 2025; around 3 weeks from today.

@jenlampton
Copy link
Author

jenlampton commented Dec 13, 2024

Drupal 7 is EOL on 05 Jan 2025; around 3 weeks from today.

Yes, exactly! The "lets wait and see" people (often those with larger / more complex D7 sites using solr) are out of time to wait, and are doing things with their old sites now :D In some cases using new developers (ahem) who need to get these old D7 sites working on ddev.

I was able to get my site working on ddev using ddev-drupal-solr after failing with ddev-solr, so this project has proved very helpful ❤

My steps were as follows:

For ddev:

  1. Install this add-on with ddev add-on get ddev/ddev-drupal-solr && ddev restart

  2. Downgrade the Solr verison to at most verison 7 - see supported solr versions for Search API.

Edit the .ddev/docker-compose.solr.yaml file, replace image: solr:8 with image: solr:7

  1. Add the corresponding schema (and other things as needed) for version 7. I got these from the D7 repo for the search_api_solr module. and add that into .ddev/solr/config.

I did cp sites/all/modules/contrib/search_api_solr/solr-conf/7.x/* .ddev/solr.conf/. but this is based on the lcoation of your module and ddev config.

  1. Restart, and voila! Confirm Solr is working by visiting http://mysite.ddev.site:8983/solr/.

In Drupal:

  1. Set up a new Search API server. The values I used are as follows: protocol: http, host: solr, port: 8983, solr path: /solr/dev (where dev is the name of the solr "core").

  2. Then set up a new Search API index, and index the site.

  3. Build a new View on the index, and then you have a search!

@tyler36
Copy link
Collaborator

tyler36 commented Dec 13, 2024

PRs are always welcome. They may take some to get merged, especially at this time of year, but other developers will find the information helpful!

@rfay
Copy link
Member

rfay commented Dec 13, 2024

Yes @jenlampton please do a PR on the README adding a section "Installation on Drupal 7" with your info. Super easy. You can even use the Github web UI to do it (click the pencil at upper right on https://github.com/ddev/ddev-drupal-solr/blob/main/README.md )

@rfay rfay changed the title Document how to get this running for Drupal 7 Instructions for ddev-drupal-solr and Drupal 7 Dec 13, 2024
@jenlampton
Copy link
Author

I have created https://github.com/ddev/ddev-drupal-solr/pull/45/files, which is maybe too much information. I'm going to create an alternate PR that removes all the views instrucitons incase that would be preferable.

@jenlampton
Copy link
Author

Okay, this one might be more palettable :)
https://github.com/ddev/ddev-drupal-solr/pull/46/files

@rfay
Copy link
Member

rfay commented Dec 13, 2024

Just FYI, you don't have to create new PRs to change things, you can push new info into an existing PR.

@jenlampton
Copy link
Author

jenlampton commented Dec 13, 2024

@rfay but then how to do compare the two options? Oh -- would you prefer separate commits? I usually like to have all of my change in a single commit. I suppose they could be squashed easily enough!

We usually do separate PRs to compare options. Force of habit, I suppose!

@rfay
Copy link
Member

rfay commented Dec 13, 2024

It's easier for reviewers if you just do the thing you think is best, then reply to suggestions. The bottom line is that you're the reigning expert here, and your suggestion is going to get accepted without trouble.

@jenlampton
Copy link
Author

My preference is for the more verbose documentation, since that information was hard to locate. I'll close the other PR and we can adjust as per feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants