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

Settings changes to make search indexing work #169

Merged
merged 5 commits into from
Apr 8, 2021
Merged

Conversation

jarosenb
Copy link
Contributor

Need to set up Aldryn so that searchable text shows up when crawling the database for CMS plugins.

@wesleyboar wesleyboar added the priority ▲ High priority label Apr 6, 2021
Copy link
Member

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description is poorly written. The PR description does not offer enough information.

And, I think the test failed.

What Should I Test?

  • The changes don't break anything, and the search behavior does not change.
  • Moving aldryn_apphooks_config out of blog features makes sense. Thank you.
  • The rest looks good, but what (current/future) problem are the new settings solving?

Based on Message That Led Me to PR…

I made a PR with some settings tweaks that should make cms content (not just titles) indexable in search.
Slack message

The CMS already searches "content (not just titles)", even before this PR:

  1. First, I tested successfully on conf/make-searchable using these steps:
    1. TACC/Core-CMS wiki "Test CMS Changes"
    2. TACC/Core-Portal wiki "How to Build Search Index"
    3. Search for text that is only in page content, not page title.
  2. But, I also tested successfully on master using the same steps.
  3. Finally, I tested successfully on production Frontera search.
Branches & CMS Images

After Guesswork & Hunting Down Sprint Ticket FP-983

Perhaps I should test that both kinds of body content are searched:

Text Added via CMS "Text" Plugin:

  1. Add Text plugin with text "Alabama" to a page "Bob" (with no prior mention of "Alabama").
  2. Publish change to page Bob.
  3. Reindex CMS.
  4. Search "Alabama".
  5. ✓ Search results show "Alabama" from Text on page Bob.

Text Hard-Coded into Template:

  1. Remove all plugins from page Home.

  2. Add template with hard-coded text to CMS secrets.

    Code
    _CMS_TEMPLATES = (
        # …
        ('guides/data_transfer.html', 'Guide: Data Transfer'),
    )
    
  3. Set page Home template to "Guide: Data Transfer".

  4. Publish change to page Home.

  5. Reindex CMS.

  6. Search "Transfer".

  7. ✕ Search results are empty

    • Expectation: Search results show "Transfer" from body content on page Bob.

Copy link
Member

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though

The CMS already searches "content (not just titles)", even before this PR

@rstijerina confirms that this is the goal of this PR. I confirm that the content is searched.

Approving.

@wesleyboar wesleyboar merged commit 54390c9 into main Apr 8, 2021
@wesleyboar wesleyboar deleted the conf/make-searchable branch April 8, 2021 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority ▲ High priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants