This PR adds an additional CONTAINS_STRING condition to the generateScientificExpression function to filter within strings in scientific metadata.
Motivation
When defining our meta data schemas we realized that it would be very helpful for us to also filter on partially matching strings in the scientific metadata. However, so far there is only EQUAL_TO_STRING for text based entries in scientific metadata so we propose an additional CONTAINS_STRING which should work on simple strings as well as on lists. Here is an example:
Description
This PR adds an additional
CONTAINS_STRING
condition to thegenerateScientificExpression
function to filter within strings in scientific metadata.Motivation
When defining our meta data schemas we realized that it would be very helpful for us to also filter on partially matching strings in the scientific metadata. However, so far there is only
EQUAL_TO_STRING
for text based entries in scientific metadata so we propose an additionalCONTAINS_STRING
which should work on simple strings as well as on lists. Here is an example:The idea of the proposed
CONTAINS_STRING
is that it would match e.g.John
in both cases (aslocalContact
as well as inexperimentalists
)Changes:
generateScientificExpression
inmongo-queryable.js
Tests included/Docs Updated?