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
Personalise events by user sector and country of interest #714
Conversation
return json.dumps({ | ||
'query': { | ||
'match_all': {} | ||
}, | ||
'sort': [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to replace the existing sorting because otherwise the search terms would not be respected - it would find documents by the provided terms but then order the results by how close the venue is to the user, meaning a result with a relevance score of 0.001 would be ahead of one with relevance score of 0.999 if the 0.001 one was geographically closer.
Replaced that sorting with exponential decay function - so values close to the user are boosted, but the relevance score is still respected,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
terms=self.get_search_terms() | ||
) | ||
response = helpers.search_with_activitystream(query) | ||
response.raise_for_status() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has more-or-less the same outcome as before: a non-200 response is returned and the error ends up in sentry, but with less codes
return json.dumps({ | ||
'query': { | ||
'match_all': {} | ||
}, | ||
'sort': [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
…16-recomment-events
3028717
to
105cae1
Compare
Codecov Report
@@ Coverage Diff @@
## develop #714 +/- ##
===========================================
- Coverage 96.52% 96.52% -0.01%
===========================================
Files 97 97
Lines 2938 2937 -1
===========================================
- Hits 2836 2835 -1
Misses 102 102
Continue to review full report at Codecov.
|
To do (delete all that do not apply):