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

Search: refactor query objects #7568

Merged
merged 5 commits into from Oct 26, 2020
Merged

Search: refactor query objects #7568

merged 5 commits into from Oct 26, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Oct 15, 2020

We were iterating over operators each time and repeating the same fields to get the highlight. I did this mainly to introduce a new improvement for partial results, so ended up splitting this into two PRs so the change is more easy to understand.

@@ -65,35 +66,55 @@ def __init__(self, query=None, filters=None, user=None, use_advanced_query=True,
}
super().__init__(query=query, filters=valid_filters, **kwargs)

def _get_text_query(self, *, query, fields, operator):
def _get_queries(self, *, query, fields):
Copy link
Member Author

Choose a reason for hiding this comment

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

The usage of this method is more clear in #7569

@stsewd stsewd requested a review from a team October 15, 2020 22:33
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

This looks good to me. 👍

stsewd and others added 2 commits October 23, 2020 13:32
@stsewd stsewd merged commit 9b3a382 into master Oct 26, 2020
2 checks passed
@stsewd stsewd deleted the partial-results branch October 26, 2020 16:11
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.

None yet

2 participants