MSFREACH / msf-reach

Web platform for MSF-REACH
https://msf-reach.org/
4 stars 5 forks source link

OR twitter search terms #673

Open matthewberryman opened 5 years ago

matthewberryman commented 5 years ago

https://github.com/MSFREACH/msf-reach/commit/1aab3ddf5bc8d5a61c42c488bbe2e8b33125e7e2

matthewberryman commented 5 years ago

@LucieGueuning please check latest work in test

LucieGueuning commented 5 years ago

FEEDBACK:

  1. So you can keep the initial version from UK digital team, as below. Area 1 and Area 2 or even Country 3 can stay in the same level of OR. Working well for the case of methanol poisoning that we are monitoring for the whole region on a daily basis. Thanks for adding the 'since:date', very relevant.

a. also, if the location is 'unknown', we should remove it from the search otherwise, nothing will show up. Or we make sure that there is no unknown location from the box in event creation. b. also, if type is 'other', we should only keep the free text of the operator for advanced search in Twitter.

(‘type1’ OR ‘type2’ OR ‘subtype’ ...) AND (‘area1’ OR ‘country1’ OR ‘area2’ OR ‘country2’ OR…) since:date

  1. I have tested it for current event, but in the test environement there is no real emergency so it is difficult to see what peolple are tweeting for a fake event. The only one to test that is current is the methanol poisoning but it seems to be less or even no results :/ image
matthewberryman commented 5 years ago

@LucieGueuning I've fixed up unknown/empty bracket cases. I've also fixed an extra open bracket bracket before the location set. Note that "Nghe An OR Vietnam" comes from the "area (province) OR country" as requested. Extra matched brackets are there so if there's more than one region it behaves properly, in the case of one region it will still work.

matthewberryman commented 5 years ago

@LucieGueuning my previous work fixing unknown/empty bracket cases had broken code syntax, just deploying a proper fix now.