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

[May/2023] - Manually update wagtail global search index #5692

Closed
3 tasks
Tracked by #226
pkfec opened this issue Apr 11, 2023 · 1 comment
Closed
3 tasks
Tracked by #226

[May/2023] - Manually update wagtail global search index #5692

pkfec opened this issue Apr 11, 2023 · 1 comment
Assignees
Milestone

Comments

@pkfec
Copy link
Contributor

pkfec commented Apr 11, 2023

Summary

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

Related issues
#5624

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 June '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

Wagtail pages have been indexed for the month of May on 05/02/2023. I am going to create a new ticket for the month of June
#5720
Screen Shot 2023-05-02 at 11 46 28 AM

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

2 participants