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

Add indexer to index authors from a blog post #52

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Add indexer to index authors from a blog post #52

merged 3 commits into from
Jan 29, 2024

Conversation

jnptk
Copy link
Contributor

@jnptk jnptk commented Jan 25, 2024

No description provided.

@jnptk jnptk requested a review from ericof January 25, 2024 12:30
@jnptk jnptk requested review from sneridagh and tisto as code owners January 25, 2024 12:30
@jnptk jnptk removed the request for review from tisto January 25, 2024 12:30
@jnptk jnptk linked an issue Jan 25, 2024 that may be closed by this pull request
@ericof ericof merged commit 908690d into main Jan 29, 2024
5 checks passed
@ericof ericof deleted the post-indexer branch January 29, 2024 17:12
author = searchResult[0].getObject()

if author is not None:
authors.append(author.title)
Copy link
Member

@davisagli davisagli Jan 30, 2024

Choose a reason for hiding this comment

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

@jonaspiterek @ericof What problem are you trying to solve by adding an index of author names? It may be necessary, but keep in mind that if the author is edited later to fix a typo in the person's name, that will not automatically reindex all their blog posts.

Also: You don't need to use getObject here, which does unnecessary work. The item's title is available from the catalog brain object that is part of the results. (searchResult[0].Title)

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

Successfully merging this pull request may close these issues.

Add indexer for indexing authors for a blog post
3 participants