NCIOCPL / clinical-trials-listing-api

API for Clinical Trial (Dynamic) Listing Pages
2 stars 2 forks source link

Move fix for unmatched c-codes into the Elasticsearch query #39

Closed blairlearn closed 3 years ago

blairlearn commented 3 years ago

The fix for issue #34 (Returning a result when only some of the requested c-codes were present, and some were not) was implemented in the middle tier because the terms query in Elasticsearch 5 doesn't provide a mechanism for requiring they all be present.

In Elasticsearch 7, the terms_set provides a mechanism for specifying a minimum number of matches. Using the minimum_should_match_script parameter would allow a script to require a minimum of the number of items being searched.

Parent Issue: #38

Sub-Tasks

-

Notes