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

BUG: Using --url when running index on a multisite not working. Getting full network index always. #2766

Closed
colegeissinger opened this issue May 16, 2022 · 0 comments · Fixed by #2771
Milestone

Comments

@colegeissinger
Copy link
Member

I looked everywhere and didn't see any mention about the index command no longer supporting the global WP-CLI command --url so reaching out here to see what's up? This may not be a bug but it was unexpected for me.

I'm working on upgrading to v4 of ElasticPress on a couple of large multisite networks. Historically I could control the indexing to a single site when needed, but after upgrading to versions 4.0.0+ the CLI command wants to index the full network no matter what.

While normally I want a full network index, I have found in one particular network there is a large sum of content to index across 60+ sites. When running the full index it eventually errors out once it reaches the end of the index with Error: Network alias creation failed for posts ..., and I was trying to debug further by syncing a single site but found the index command doesn't seem to honor the --url parameter anymore after 4.0.0. This still works fine in 3.6.6 though?

Steps to Reproduce

  1. In your command prompt, run the index CLI command for a single site in your subdirectory multisite install wp elasticpress index --setup --yes --url=https://test-multisite.test/some-sub-site
  2. Observe that the indexing logs report starting from site ID 1 and continue through all the sites in the network.

Expected behavior
I expect the index command to ONLY focus on indexing the site provided in the --url parameter offered by WP-CLI which was supported in ElasticPress 3.6.6.

Screenshots
NOTE: The doc in my command is an alias for 10updocker
Screenshot from 2022-05-16 14-44-11

Environment information

  • Device: All devices tested on (locally and on hosting)
  • OS:
  • Browser and version:
  • WordPress version: 5.9.3
  • ElasticPress version: 4.0.0+
  • Elasticsearch version: Unsure on version
  • Where do you host your Elasticsearch server? elasticpress.io
  • What ElasticPress features do you have currently active?
  • Plugins and version:
  • Theme and version:
  • Site Health Info:

Additional context

@colegeissinger colegeissinger added the bug Something isn't working label May 16, 2022
@felipeelia felipeelia added this to the 4.2.0 milestone May 17, 2022
@felipeelia felipeelia added confirmed bug and removed bug Something isn't working labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants