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

fix: do not return false immediately with negative operators #1058

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thucpn
Copy link
Collaborator

@thucpn thucpn commented Jul 19, 2024

I think != operator should able to check whether the key is existed or not
Eg:

{
  "key": "private",
  "value": "true",
  "operator": "!="
}
-> Should return true when metadata[private] = "false" or metadata[private] = undefined.

So I think we can change from "if the metadata key is not present, always return false"

to "for all operators except != and nin, if the metadata key is not present, return false"

I also add some tests when filtering nodes have optional key

Copy link

changeset-bot bot commented Jul 19, 2024

⚠️ No Changeset found

Latest commit: c1e82bd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jul 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
llama-index-ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 5:22am

Copy link

pkg-pr-new bot commented Jul 19, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

commit: c1e82bd

@llamaindex/autotool

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/autotool@1058

@llamaindex/cloud

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/cloud@1058

@llamaindex/community

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/community@1058

@llamaindex/core

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/core@1058

@llamaindex/env

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/env@1058

@llamaindex/experimental

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/experimental@1058

llamaindex

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/llamaindex@1058

@llamaindex/wasm-tools

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/wasm-tools@1058


templates

@thucpn
Copy link
Collaborator Author

thucpn commented Aug 9, 2024

@marcusschiesser I think we can close this PR because is_empty has already added in PR #1107

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.

1 participant