spring-projects / spring-projects/spring-ai

Vector Store Filter Expression does not support boolean types

Open
#3,876 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

metadata filters status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

The filter expression does not support boolean metadata fields.

Consider a document which has following metadata.
is_active: true

I tried various expressions. It does not work.

SearchRequest.builder()
             .query(my_query)
             .filterExpression("is_active == true")
             .build()

Workaround is to stringify.
is_active: "true"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing SearchRequest.builder() and filterExpression("is_active == true") through the vector store filtering path. Compare boolean metadata handling with the documented string workaround, then verify that boolean metadata filters successfully match documents while existing expressions remain supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.