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

[Question]: about metadatafilter function: to filter empty array #17849

Open
1 task done
wbqtac opened this issue Feb 18, 2025 · 1 comment
Open
1 task done

[Question]: about metadatafilter function: to filter empty array #17849

wbqtac opened this issue Feb 18, 2025 · 1 comment
Labels
question Further information is requested

Comments

@wbqtac
Copy link

wbqtac commented Feb 18, 2025

Question Validation

  • I have searched both the documentation and discord for an answer.

Question

Hello all,

I might use an old version of llamaindex, for the most updated version. Does it support to filter those nodes, where specific meta data field value is empty array? The following filters does not work for me with my current old version:
MetadataFilter(key="some_key", value=[], operator=FilterOperator.NE)
MetadataFilter(key="some_key", operator=FilterOperator.IS_EMPTY)

Thanks.

@wbqtac wbqtac added the question Further information is requested label Feb 18, 2025
Copy link

dosubot bot commented Feb 18, 2025

Hey @wbqtac! I'm here to help you with any bugs, questions, or contributions you have. I'm a bot designed for just that. Let me know how I can assist you!

Yes, the latest version of LlamaIndex supports filtering nodes with empty arrays in metadata fields. You can use the FilterOperator.IS_EMPTY to filter nodes based on a metadata key that does not exist or is empty. This functionality is confirmed by a test case that demonstrates filtering nodes with empty metadata fields using the IS_EMPTY operator [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant