weaviate / weaviate/weaviate-python-client

Improve dynamic filters

Open
#1,092 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
227
Forks
151
Avg merge
3d 14h
Merged PRs (30d)
11

Description

We currently allow to add multiple filters dynamically using Filter.all_of(..list..of..filters...).

However, users still need to handle the case that:

  • there are no filters (list is empty)
  • some of the filters are None

We should handle this case and:

  • filter None out
  • In case there are no filters, we return a Non-filter that works like any other of our filters (eg supports + and - with other filters). Internally they are then ignored

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 at the Python client's Filter.all_of implementation and inspect how filters support + and - composition. Done means None entries are ignored, an empty list returns a neutral filter, and that neutral filter composes with other filters while being omitted internally.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.