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

Two sites sharing a single Solr core possible? #5

Open
gitressa opened this issue Jun 30, 2020 · 3 comments
Open

Two sites sharing a single Solr core possible? #5

gitressa opened this issue Jun 30, 2020 · 3 comments

Comments

@gitressa
Copy link

Has anyone managed to get Drupal 8 Search API Solr multisite feature, sharing a single Solr core, running in Lando? Just to be clear, this is not a Drupal multisite installation, but two separate web sites, sharing a single Solr core, to be able to index and search in both sites, on either web site.

I am fine with both these scenarios, whichever is easier to set up:

@pirog pirog self-assigned this Jul 2, 2020
@gitressa
Copy link
Author

gitressa commented Aug 1, 2020

I am glad to see a milestone have been added 👍

It seems to almost work, though I am not sure if Lando, Drupal or Solr is the issue ... I have created two individual Lando instances, which share a single Solr core. They can connect and index to this core, when they are both running, or individually.

From web site A (218 nodes) search index admin page:

218/218 indexed
...
Server index status   There are 431 items indexed on the server for this index.

I get suggestions (using the Search API Autocomplete module) from Solr indexed content from both web sites.

Before clearing all indexed data (218/218 indexed), number of indexed words getting suggested in an autocomplete enabled search field:

  • technical 53
  • referrals 27

The search result will show link to nodes of current web site A, links to web site B are missing.

After clearing all indexed data (0/218 indexed), numbers of hits are reduced, as expected:

  • technical 20
  • referrals 19

The search result now shows no links at all, also as expected. From the logs of web site A:
Drupal\search_api\SearchApiException: The datasource with ID '2xkmvb--entity:node' could not be retrieved for index 'Search index'. in Drupal\search_api\Entity\Index->getDatasource() (line 369 of /app/web/modules/contrib/search_api/src/Entity/Index.php).

Web site B logs are all about The datasource with ID '31hyfe--entity:node' ....

Also, it seems like the Solr core from the Lando instance which was started first comes first in the alphabet is receiving the indexed data, if that makes sense. So, if only web site B is running, its Solr core will be indexed to. But as soon as web site A is started, it will take over, from both web site A and B.

Web site A
http://admin.websitea.lndo.site/solr/#/absearch/core-overview
Num Docs: 431

Web site B
http://admin.websiteb.lndo.site/solr/#/absearch/core-overview
Num Docs: 0

@stale
Copy link

stale bot commented Apr 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@gitressa
Copy link
Author

Thanks Stalebot, but this issue is still relevant.

@rtfm-47 rtfm-47 transferred this issue from lando/lando Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants