Skip to content

feat: Add Boost API#2030

Open
trengrj wants to merge 3 commits into
dev/1.38from
feature/boost
Open

feat: Add Boost API#2030
trengrj wants to merge 3 commits into
dev/1.38from
feature/boost

Conversation

@trengrj
Copy link
Copy Markdown
Member

@trengrj trengrj commented May 1, 2026

Adds Boost features weaviate/weaviate#11103 to python client.

Near Vector/Object/XYZ operators now support a boost parameter.

Boost.property - for property boosts
Boost.filter - for filter boosts
Boost.numeric_decay for numeric decay boosts
Boost.time_decay for time decay boosts
Boost.blend for combining multiple boosts together.

All allow for an optional depth and weight parameter to control boosting impact. Time decay has a _decay_value_to_str helper for supporting python time values.

Property modifiers and Decay curves have constants.

Integration test added with 1.38 gate.

Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@trengrj trengrj changed the title Add Boost API feat: Add Boost API May 1, 2026
@trengrj trengrj changed the base branch from main to dev/1.38 May 21, 2026 04:11
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 21, 2026

Codecov Report

❌ Patch coverage is 67.28395% with 53 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (dev/1.38@c307d97). Learn more about missing BASE report.

Files with missing lines Patch % Lines
integration/test_collection_boost.py 63.63% 20 Missing ⚠️
weaviate/collections/grpc/query.py 29.16% 17 Missing ⚠️
weaviate/collections/classes/grpc.py 80.72% 16 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             dev/1.38    #2030   +/-   ##
===========================================
  Coverage            ?   86.53%           
===========================================
  Files               ?      300           
  Lines               ?    23051           
  Branches            ?        0           
===========================================
  Hits                ?    19948           
  Misses              ?     3103           
  Partials            ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trengrj trengrj requested a review from dirkkul May 21, 2026 04:32
Comment thread weaviate/collections/classes/grpc.py Outdated
Comment thread weaviate/collections/classes/grpc.py
Comment thread weaviate/collections/classes/grpc.py Outdated
Comment thread weaviate/collections/classes/grpc.py Outdated
Comment thread weaviate/collections/classes/grpc.py Outdated
)

@staticmethod
def property( # noqa: A003
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def property( # noqa: A003
def numeric_property( # noqa: A003

suggestion: if numeric_decay has the "numeric_" prefix to highlight that it's only applicable to numeric properties, then I'd argue this method should have it as well

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't make a timestamp_property operator as Timestamps need a sensible scale. I'm open to changing it to numeric_property but it feels a bit more confusing to users.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numeric_property but it feels a bit more confusing to users

My speculation is that property suggest any property (bool, text, blob) can be used, whereas numeric_property sort of constraints that ==> less confusing.

Ofc that is unless we are planning to extend Boost in a way that, say, a text property can be boosted too, and that'll use Boost.property.

Comment thread weaviate/collections/classes/grpc.py
Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

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.

3 participants