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

Make sort_name sortable 🙃 #1146

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Make sort_name sortable 🙃 #1146

merged 4 commits into from
Jul 29, 2024

Conversation

hancush
Copy link
Collaborator

@hancush hancush commented Jul 24, 2024

Overview

This PR updates the configuration of the sort_name field so ElasticSearch will actually sort by it. Reference: django-haystack/django-haystack#569

Connects #1142

Testing Instructions

This change requires an index rebuild to take effect, so you'll have to test locally.

  • Run the app as instructed in the README. Make sure to follow the instructions for populating your search index.
  • Run a search.
  • On the results page, sort by title and confirm the sorted results load without error.

@hancush hancush linked an issue Jul 24, 2024 that may be closed by this pull request
@fgregg fgregg temporarily deployed to la-metro-cou-hcg-sort-f-bbsqcb July 24, 2024 16:07 Inactive
@hancush hancush requested a review from antidipyramid July 24, 2024 16:18
@hancush hancush marked this pull request as ready for review July 24, 2024 16:26
Copy link
Collaborator

@antidipyramid antidipyramid left a comment

Choose a reason for hiding this comment

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

Works great! Just one comment.

RECAPTCHA_PRIVATE_KEY=(str, ""),
# Test keys from:
# https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do
RECAPTCHA_PUBLIC_KEY=(str, "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"),
Copy link
Collaborator

@antidipyramid antidipyramid Jul 25, 2024

Choose a reason for hiding this comment

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

Locally, I had to remove the corresponding (empty) recaptcha variables from .env.local to get this to work. django-environ seems to parse empty variables as present and won't use the default.

We should probably remove these variables from .env.local.example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great catch. Done!

@hancush hancush temporarily deployed to la-metro-cou-hcg-sort-f-bbsqcb July 29, 2024 13:41 Inactive
@hancush hancush temporarily deployed to la-metro-cou-hcg-sort-f-bbsqcb July 29, 2024 13:48 Inactive
@hancush hancush merged commit ff8de97 into main Jul 29, 2024
2 checks passed
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.

Sorting board reports by title raises an error
3 participants