Open
Conversation
added 12 commits
February 27, 2026 09:11
Kat-Alo
commented
Mar 17, 2026
| # (larger value means fewer queries, but more memory usage) | ||
| queryset_pagination = 500 | ||
|
|
||
| def get_queryset(self): |
Author
There was a problem hiding this comment.
This is, I think, the biggest performance win from reevaluating the indexing. Basically, we are gathering all the fields, including on other models, at the start so that we don't have to do it for every row we're indexing.
Kat-Alo
commented
Mar 17, 2026
|
|
||
|
|
||
| @registry.register_document | ||
| class DeedPageDocument(Document): |
Author
There was a problem hiding this comment.
Defines the actual elasticsearch index of DeedPage objects
Kat-Alo
commented
Mar 17, 2026
| data = super().get_context_data(**kwargs) | ||
| data['all_workflows'] = ZooniverseWorkflow.objects.all() | ||
| return data No newline at end of file | ||
| def generate_search_query(self, search_terms_list: list[str], param_filters: dict): |
Author
There was a problem hiding this comment.
We can play with this function if we don't like the number of results returned
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces Elasticsearch index for DeedPage objects, as well as documentation for local set up. This PR includes a new API search endpoint but does not update the search page in the application. That will come in the next PR.
Testing