Adjust boosting again and filter results using AND operator in an attempt to improve relevance of results
@@ -50,7 +50,8 @@ def search(search_params, index, page_size, page=1) -> Response:
keywords = ' '.join(search_params.data['q'].lower().split(','))
s = s.query("constant_score", filter=Q("multi_match",
query=keywords,
- fields=['detailed_tags^3', 'tags^3', 'creator', 'title^4']))
+ fields=['detailed_tags^2', 'tags^2', 'creator', 'title^2'],
+ operator='AND'))
s.extra(track_scores=True)
search_response = s.execute()
