Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: SqliteVectorStoreRecordCollection.VectorizedSearchAsync() Filter usage throws exception #11132

Open
philipag opened this issue Mar 23, 2025 · 0 comments
Assignees
Labels
bug Something isn't working Build Features planned for next Build conference msft.ext.vectordata Related to Microsoft.Extensions.VectorData

Comments

@philipag
Copy link

The following code is wrong:

 if (searchOptions.Filter is not null)
        {
            if (searchOptions.Filter is not null)
            {
                throw new ArgumentException("Either Filter or OldFilter can be specified, but not both");
            }

            // Old filter, we translate it to a list of SqliteWhereCondition, and merge these into the conditions we already 

The first line should be:

if (searchOptions.OldFilter is not null)

Otherwise using Filter instead of OldFilter always throws.

@philipag philipag added the bug Something isn't working label Mar 23, 2025
@markwallace-microsoft markwallace-microsoft added Build Features planned for next Build conference msft.ext.vectordata Related to Microsoft.Extensions.VectorData labels Mar 31, 2025
@westey-m westey-m moved this from Bug to Sprint: In Progress in Semantic Kernel Apr 3, 2025
@westey-m westey-m moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernel Apr 3, 2025
github-merge-queue bot pushed a commit that referenced this issue Apr 3, 2025
### Motivation and Context

#11132

### Description

Fix bug in sqlite filter logic

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
@westey-m westey-m moved this from Sprint: In Review to Sprint: Done in Semantic Kernel Apr 3, 2025
glorious-beard pushed a commit to glorious-beard/semantic-kernel that referenced this issue Apr 6, 2025
### Motivation and Context

microsoft#11132

### Description

Fix bug in sqlite filter logic

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build Features planned for next Build conference msft.ext.vectordata Related to Microsoft.Extensions.VectorData
Projects
Status: Sprint: Done
Development

No branches or pull requests

3 participants