LAPIS
LAPIS copied to clipboard
[DO NOT MERGE] feature branch regex
resolves #750
This feature branch maps string fields from the API to SILO's StringSearch instead of StringEquals expressions
This is a breaking change as any search for a string field will now also assume the value to be a regex string, whereas before it was just a string that was compared against the column values with equality.
The problem with a permanent solution is that the current api just expects a pair of "column": "value"
, where not specification of whether the filtering should be done with equality or regex matching is possible.
Possible solutions:
- Upon short consideration, it is expected that string columns are going to need not both types, but only one type of the filter expressions. E.g. author lists will generally be filtered with regexes, the primary key with equality. This could therefore be configured in the column declarations (i.e. in the database_config)
- Make LAPIS parse the
"value"
. If it is of the form"regex({})"
/"LIKE {}"
, we will regex-match it, if"= {}"
we will compare with equality. - Make LAPIS parse the
"column"
. If it is of the form"{column}Match"
, we will regex-match, otherwise we will compare with equality. - Change the API to take objects instead of one
"value"
PR Checklist
- [ ] All necessary documentation has been adapted.
- [ ] The implemented feature is covered by an appropriate test.