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

[June/2023] - Manually update wagtail global search index #5720

Closed
2 of 3 tasks
Tracked by #159
johnnyporkchops opened this issue May 2, 2023 · 1 comment
Closed
2 of 3 tasks
Tracked by #159

[June/2023] - Manually update wagtail global search index #5720

johnnyporkchops opened this issue May 2, 2023 · 1 comment
Assignees
Labels
Global Search Global Search
Milestone

Comments

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented May 2, 2023

Summary

What we're after:
Update the global search.gov index for new pages that were published since last index May, 2023.

Related issues
#5692

Completion criteria:

--- OR---

  • Do this in production in the CloudFoundry CLI...Wiki below (Ask @johnnyporkchops if questions)

    WIKI for scraping and indexing CMS pages in production using CloudFoundry CLI
    • This is basically the same as the local process but you do not need to get a database dump first.
    1. Login to CloudFoundry and target space:
      cf target -s prod

    2. SSH into CMS:
      cf ssh cms

    3. Configure for Python:
      export DEPS_DIR=/home/vcap/deps
      for f in /home/vcap/profile.d/*.sh; do source "$f"; done

    4. cd app/fec

    5. ./manage.py scrape_cms_pages
      This will create output.json at /search/management/data/

    6. Export the env vars for the drawer for the shell session:
      - export SEARCHGOV_DRAWER_KEY_MAIN=xxxx
      - export SEARCHGOV_DRAWER_HANDLE=xxxx
      Note: You can get these creds using cf env cms in a new tab

      Verify that the env var creds are there:
      echo $SEARCHGOV_DRAWER_KEY_MAIN
      Note: You cannot verify the env vars by just typing “env” like you could on your local because that will show local env vars, but not those available to the cloud shell session you are in.

    7. ./manage.py index_pages

    8. Remove the output.json file for good measure since it’s git-ignored and not part of the repo:
      rm search/management/data/output.json

  • Create ticket for July '23 manual Wagtail global search index

Note: If you are sharing a screenshot of the dashboard as confirmation of latest index dates, be sure to NOT to include the key in your screenshot area.

@johnnyporkchops
Copy link
Contributor Author

Wagtail pages have been indexed for the June on 06/05/2023.
Screen Shot 2023-06-05 at 3 06 29 PM

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

No branches or pull requests

1 participant