Closed wilfi closed 3 months ago
![Uploading Screenshot 2024-06-27 at 3.10.08 AM.png…]()
If you show the configuration for the first site and the second site, and make it clear which one has the solr service, maybe we'll have something to say.
Sure. Let me detail it out here.
Current behaviour
Attaching the Site A & B's Search server configs and Site A's multisite index yaml (which is imported to Site B)
multisearch_index.yml.txt site_a_search_server.yml.txt site_b_search_server.yml.txt
TIA!
https://github.com/ddev/ddev-solr/assets/6604995/8995ab9b-765c-4f31-995f-23fec8ff9410
Here is the video clip of what I'm experiencing. This is from Site B.
The host
in site_b_search_server.txt is wrong. solr
would access the ddev-solr service of site B, which doesn't exist.
The host name has to be something like site-b.ddev.site
.
@rfay Even if the config isn't correct, I don't understand how site B, which is a different ddev project, could sometimes reach the solr service of site A. With that configuration (the wrong host name) it should never reach it. Is there a general issue with the router?
@mkalkbrenner Projects can connect to each others' services using their fully-qualified container names, like ddev-projecta-solr
or ddev-projectb-db
, etc.
@wilfi unfortunately I can't read your configurations, and github says the images are not available to zoom in on. If you could please just show the configuration pages of each as a screenshot.
The
host
in site_b_search_server.txt is wrong.solr
would access the ddev-solr service of site B, which doesn't exist. The host name has to be something likesite-b.ddev.site
.
This is what I tried initially, but wasn't working until I switched to solr
, tried once more now but no luck.
@mkalkbrenner Projects can connect to each others' services using their fully-qualified container names, like
ddev-projecta-solr
orddev-projectb-db
, etc.@wilfi unfortunately I can't read your configurations, and github says the images are not available to zoom in on. If you could please just show the configuration pages of each as a screenshot.
@rfay Here we go - I assume you want to see the server configuration page. Let me know if you want the edit page as well.
Site B (No solr)
Site A
Here is the edit page screenshots just in case if you want to see.
Site B
Site A
I think I got the problem. The hostname / node should be like ddev-<projectname>-solr
.
The
host
in site_b_search_server.txt is wrong.solr
would access the ddev-solr service of site B, which doesn't exist. The host name has to be something likesite-b.ddev.site
.
This from @mkalkbrenner made me realise to try with the solr image name. In fact the message thread from @rfay from #ddev slack channel also conveys the same.
Turns out to be a simpler one than I thought. Thankyou both for the amazing work :)
I'll wait for both your go-ahead to close this one out, unless we want to talk about this
@rfay Even if the config isn't correct, I don't understand how site B, which is a different ddev project, could sometimes reach the solr service of site A. With that configuration (the wrong host name) it should never reach it. Is there a general issue with the router?
Glad you got it going!
@mkalkbrenner I should have answered your question:
With that configuration (the wrong host name) it should never reach it. Is there a general issue with the router?
With this configuration, the router is not in play at all, it's direct point-to-point between each ddev-webserver
and the appropriate ddev-<projectname>-solr
@wilfi I'm glad you've got it going. None of your posts seems to show a correct configuration though. Please explain the final result so that if somebody wants to do this in the future they can figure it out
AFAICT the "solr node" should be named ddev-site1-solr
or whatever on both Drupal instances.
So here is the final working configuration.
Site B
Key point - Make sure hostname / node points to - ddev-<projectname>-solr
(Site A Solr image name)
Thanks!
I’m performing a multisite search per this guide here - https://www.drupal.org/docs/8/modules/search-api-solr/search-api-solr-howtos/set-up-and-configure-a-multisite-search
With ddev-solr add-on, I connected Site A SOLR endpoint to Site B. Server status shows as - 'The Solr server could be reached.'
When I point the specific collection of Site A SOLR to Site B, it initially showed as ' The collection could be accessed' , but when I keep refreshing the page it shows as 'The Solr collection could not be accessed. Further data is therefore unavailable.'
This is not consistent as well. It keeps fluctuating.
And I'm facing the same problem when I do any search with the cloned multisite index from Site A on Site B. At times the result shows 0 , at times it errors out, at times it gives the right resultset.
Is this expected behaviour? Or am I doing something wrong.
Thankyou.