Skip to content

[Feature Request]: add filter to match functions #1803

@yuzhichang

Description

@yuzhichang

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

NA

Describe the feature you'd like

Match functions (match_text, match_vector, match_sparse, match_sparse) need the filter.
The multiple functions of a fusion can have different fitlers.
Each filter consists of boolean expressions and filter_fulltext function.
filter_fulltext function behaves like match_fulltext, but without scoring and topn limit. Its output is a roaring bitmap.

The python sample look like:

    result = table_instance.output(["num", "vec", "_similarity"]).match_sparse("vec", SparseVector([0, 20, 80], [1.0, 2.0, 3.0]), "ip", 3, {'filter': 'a > 0 AND b<0 OR filter_fulltext("body", "A OR B OR C", "min_match=2")'}).to_pl()

Describe implementation you've considered

No response

Documentation, adoption, use case

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions