outbreak-info / outbreak.info-resources

A curated repository of metadata of resources on COVID-19 and SARS-CoV-2
MIT License
0 stars 4 forks source link

Tweak ES search behavior to not split on hyphens #89

Open flaneuse opened 4 years ago

flaneuse commented 4 years ago

Unfielded queries on search terms with hyphens leads to different results:

https://api.outbreak.info/resources/query?q=mRNA-1273

vs

https://api.outbreak.info/resources/query?q="mRNA-1273"

According to Jerry, related to the copy_to:all behavior to allow free searching. "when we copy all fields to all, it's searched as the mapping of "all" field, which is text, so, for a field that's supposed to be a keyword, it won't be matched that way, it is actually reindexed as text, this is a side-effect of using all. "

NOTE: "mRNA-1273” should match on description which is currently mapped as text, not keyword