Skip to content

feat(lapis): also allow multiple value in int, float and date filters (and concatenate them with or)#1626

Merged
fengelniederhammer merged 7 commits intomainfrom
1595-search-for-int-and-float-fields-only-allows-exact-match
Apr 10, 2026
Merged

feat(lapis): also allow multiple value in int, float and date filters (and concatenate them with or)#1626
fengelniederhammer merged 7 commits intomainfrom
1595-search-for-int-and-float-fields-only-allows-exact-match

Conversation

@fengelniederhammer
Copy link
Copy Markdown
Contributor

@fengelniederhammer fengelniederhammer commented Mar 31, 2026

resolves #1595

int, float, and date exact-match filters now accept an array of values, combining them with logical OR — the same behaviour already supported for string fields.

{ "age": [50, 51, 52] }
{ "qcValue": [0.95, 0.97, 0.8] }
{ "date": ["2021-05-08", "2021-01-20"] }

null is supported as an array element to filter for missing values. Range filters (*From/*To) are unchanged and still accept a single value only.

PR Checklist

  • All necessary documentation has been adapted.
  • All necessary changes are explained in the llms.txt.
  • The implemented feature is covered by an appropriate test.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lapis Ready Ready Preview, Comment Apr 10, 2026 7:14am

Request Review

@fengelniederhammer fengelniederhammer changed the title feat(LAPIS): also allow multiple value in int and float filters (and concatenate them with or) feat(lapis): also allow multiple value in int and float filters (and concatenate them with or) Mar 31, 2026
@fengelniederhammer fengelniederhammer changed the title feat(lapis): also allow multiple value in int and float filters (and concatenate them with or) feat(lapis): also allow multiple value in int, float and date filters (and concatenate them with or) Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds multi-value exact-match support (logical OR semantics) for int, float, and date metadata filters in LAPIS—bringing them in line with existing multi-value behavior for string filters—and updates docs/tests accordingly.

Changes:

  • Extend int/float/date exact-match filters to accept multiple values and map them to an Or(...) SILO filter expression (including null as “is missing”).
  • Update OpenAPI + template/docs + docs-site filter descriptions to reflect new multi-value capability.
  • Add/adjust unit + e2e coverage for multi-value exact-match queries.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lapis/src/main/kotlin/org/genspectrum/lapis/model/SiloFilterExpressionMapper.kt Implements OR-combination for multi-value exact-match int/float/date filters (including null).
lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt Updates filter schemas so int/float/date exact-match filters accept either a scalar or an array.
lapis/src/main/resources/templates/llms.txt Updates end-user docs to describe array support for date/int/float exact matches.
lapis/src/test/kotlin/org/genspectrum/lapis/model/SiloFilterExpressionMapperTest.kt Adjusts/extends unit test expectations for OR-wrapped exact-match expressions and new multi-value cases.
lapis-e2e/test/aggregatedQueries/intEqualsMultiple.json New e2e aggregated-query fixture validating multi-value int equals behavior.
lapis-e2e/test/aggregatedQueries/floatEqualsMultiple.json New e2e aggregated-query fixture validating multi-value float equals behavior.
lapis-e2e/test/aggregatedQueries/dateEqualsMultiple.json New e2e aggregated-query fixture validating multi-value date equals behavior.
lapis-e2e/test/aminoAcidSequence.spec.ts Updates an assertion to match a changed SILO error message wording.
lapis-docs/src/components/FiltersTable/getFilters.tsx Updates docs-site filter descriptions to mention array/OR semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lapis-docs/src/components/FiltersTable/getFilters.tsx
Comment thread lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt
Comment thread lapis/src/main/resources/templates/llms.txt Outdated
const errorResponse = await response.json();
expect(errorResponse.error.detail).to.match(
/Error from SILO: The table does not contain the SequenceColumn 'unknownGene'/
/Error from SILO: The table does not contain the field unknownGene/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR, but SILO recently changed the error message in this case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Copy Markdown
Contributor

@fhennig fhennig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the null documentation case seems worth attemting to fix.

@fengelniederhammer fengelniederhammer merged commit 7e2736c into main Apr 10, 2026
8 checks passed
@fengelniederhammer fengelniederhammer deleted the 1595-search-for-int-and-float-fields-only-allows-exact-match branch April 10, 2026 07:24
fengelniederhammer pushed a commit that referenced this pull request Apr 10, 2026
🤖 I have created a release *beep* *boop*
---


## [0.8.1](v0.8.0...v0.8.1)
(2026-04-10)


### Features

* **lapis:** also allow multiple value in int, float and date filters
(and concatenate them with `or`)
([#1626](#1626))
([7e2736c](7e2736c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search for Int and float fields only allows exact match

3 participants