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

Platform sites indexing issue #325

Open
4 tasks done
StudioZut opened this issue Oct 17, 2024 · 7 comments
Open
4 tasks done

Platform sites indexing issue #325

StudioZut opened this issue Oct 17, 2024 · 7 comments
Assignees

Comments

@StudioZut
Copy link
Contributor

StudioZut commented Oct 17, 2024

We're still having issue with site content (on flagship and other platform sites) not always appearing in site search or sometimes in resource lists.

Example (Brasil): This profile was created, but not appearing in site search or in the staff list: https://www.wribrasil.org.br/equipe/laura-rossler -- I re-index manually 10-16, which fixed it.

Example (Brasil): "we noticed that our events page is also not updating correctly. We posted this (https://www.wribrasil.org.br/eventos/2024/wri-brasil-na-cop-16-biodiversidade) and its not showing on the events page (https://www.wribrasil.org.br/eventos)." -- this also was fixed after re-indexing manually.

Example (Brasil): 2 posts weren't showing up in their library at https://www.wribrasil.org.br/biblioteca :
https://www.wribrasil.org.br/noticias/creditos-de-biodiversidade-podem-impulsionar-conservacao-da-natureza and
https://www.wribrasil.org.br/noticias/o-que-e-uma-estrategia-climatica-de-longo-prazo -- Maria fixed 10-15 "I ran the queries to disconnect and reconnect to solr and that seems to have done it"

Example (Brasil): they found 2 posts that weren't appearing in past events (also fixed with re-indexing)
Image

Dev tasks

  • Install https://www.drupal.org/project/dblog_persistent and enable to permanently log any messages with the text "DOCS_AND_FREQS_AND_POSITIONS"
  • Add enabling this module and its settings as an install hook in wri_sites
  • Upgrade Search Api Pantheon to the latest release 8.2.1
  • Translate the steps in here:
terminus drush your-site.your-env -- sapi-sc pantheon
terminus drush your-site.your-env -- sapps pantheon /code/web/modules/contrib/search_api_solr/jump-start/solr8/config-set/
terminus drush your-site.your-env -- en search_api_solr_admin
terminus drush your-site.your-env -- solr-reload pantheon
terminus drush your-site.your-env -- sapi-rt
terminus drush your-site.your-env -- sapfc pantheon
terminus drush your-site.your-env -- sapi-sc pantheon
terminus drush your-site.your-env -- sapi-sd pantheon
terminus drush your-site.your-env -- sapi-se pantheon
terminus drush your-site.your-env -- sapi-ena
terminus drush your-site.your-env -- sapi-i

Into things that can be done in the admin area and document that somewhere.

Admin version of above:

  1. On /admin/config/search/search-api/server/pantheon push the "Delete all indexed data on this server" button.
  2. Enable the "Search API Pantheon Admin" module and the "search_api_solr_admin" module, if it isn't already, on /admin/modules
  3. ON /admin/config/search/search-api/server/pantheon/pantheon-admin/schema push the schema (leave the text box empty)
  4. From /admin/config/search/search-api/server/pantheon click "Reload Core"
  5. sapi-rt -- Run cron from /admin/config/system/cron
  6. On /admin/config/search/search-api/server/pantheon push the "Delete all indexed data on this server" button. again
  7. sapi-sd -- on /admin/config/search/search-api click the dropdown beside "Edit" next to the Pantheon server and click "Disable"
  8. On /admin/config/search/search-api click the dropdown beside "Edit" next to the Pantheon server and click "Enable"
  9. On /admin/config/search/search-api click the dropdown beside "Edit" next to the Sitewide index and click "Enable"
  10. On /admin/config/search/search-api/index/sitewide click "Index now". If it asks you to "Retrack" do that first.
@mariacha
Copy link
Collaborator

Pantheon caught some logs:

Uncaught PHP Exception Error: "Call to a member function getSearchId() on null" at /code/web/modules/contrib/search_api/search_api.module line 602[17-Oct-2024 04:28:23 UTC]

The search_api module doesn't have any issues open for this, and doesn't have a new release, so there must be something handing the search_api.module a call to getSearchId on a null item in an unexpected way.

Looking at the code, the error would only be thrown in the unlikely circumstance that the $view->getQuery() function didn't return anything.

So I don't think we'll get far down that path.

We had noticed the same issue a few days before, where the logs were returning the error we were seeing when the Solr database was on version 4.2, but it was on version 4.3.5 when I checked. Running through the commands to clear out and re-index eventually started working, but I wasn't convinced that these commands had fixed anything. It felt a lot more like the server was temporarily pointing to an old, bad schema version, and it just fixed itself with some cron run or something.

Perhaps at this point it's worth writing some kind of script to notify us if an error about "DOCS_AND_FREQS_AND_POSITIONS" happens on one of the sites, so we can get a sense of how often this comes up.

@mariacha mariacha self-assigned this Oct 21, 2024
@mariacha
Copy link
Collaborator

Perhaps this module would help for sending out the notifications: https://www.drupal.org/project/logging_alerts

And/or this one for permanently logging any search notifications: https://www.drupal.org/project/dblog_persistent

@mariacha
Copy link
Collaborator

The action item out of here was to install a couple new modules, and that's in the description.

We'll be able to review any Search API errors at https://develop-wriflagship.pantheonsite.io/admin/reports/persistent-log

and if we want to set up error notifications, we can do that on the live site.

@mariacha
Copy link
Collaborator

Quick note about this one, Pantheon is recognizing their issues with Solr reverting in this incident:
https://status.pantheon.io/incidents/rv8bw0v6rbjy

I'm taking this ticket back to keep working on the admin instructions.

@mariacha
Copy link
Collaborator

mariacha commented Dec 4, 2024

The thing to test here is that "Search API Pantheon" is at 8.2.2 on https://develop-wriflagship.pantheonsite.io/admin/modules

I looked at that and it seems fine, so setting to "Ready to Deploy"

@komejo
Copy link
Contributor

komejo commented Dec 6, 2024

Note: this has been done on WRI-China. )Fri Dec 13. > [notice] Message: Successfully indexed 1343 items.

@mariacha
Copy link
Collaborator

mariacha commented Dec 9, 2024

I added a new section to the Content Editor's guide about how to fix this error. See "Troubleshooting steps if solr is not indexing".

@shannon-paton @wthomaswri It just so happens that the Develop site for Espanol is in the state where you can test out these instructions right now:

https://develop-wri-espanol.pantheonsite.io/admin/config/search/search-api/server/pantheon

Can you run through the steps in that document and let me know if they make sense/fix the schema version?

@mariacha mariacha assigned shannon-paton and wthomaswri and unassigned mariacha Dec 9, 2024
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

5 participants