Noticed by a user running some Explorer queries. This following test snippet verifies what we are seeing in the UI when clicking a date on the attention chart - sentenceList is returning sentences with text that does not contain the query keywords:
keyword = "Carnegie Endowment for International Peace"
matching_sentences = mc.sentenceList(u'("Carnegie Endowment for International Peace") AND (( tags_id_media:(58722749)))',
'publish_day:[2018-10-24T00:00:00Z TO 2018-10-26T00:00:00Z]', rows=10)
for s in matching_sentences[:10]:
is_match = keyword in s['sentence']
print("{}: {}".format(s['story_sentences_id'], is_match))
Shows that only 1 of the 10 sentences returned actually have the search string in them
Noticed by a user running some Explorer queries. This following test snippet verifies what we are seeing in the UI when clicking a date on the attention chart -
sentenceList
is returning sentences with text that does not contain the query keywords:Shows that only 1 of the 10 sentences returned actually have the search string in them
(This is potentially the same underlying bug as #500)