Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fe4b6dc
Add 1.38 docs
g-despot May 25, 2026
192f84d
Add docs
g-despot May 25, 2026
6af1e75
Merge branch 'main' into v1-38/main
g-despot May 26, 2026
cb116dc
Add MCP docs changes
g-despot May 27, 2026
b83fbb1
Merge branch 'v1-38/main' into v1-38/nested-object-filtering
g-despot May 28, 2026
bdfb159
Update docs
g-despot May 28, 2026
c52cc20
Update docker images
g-despot May 28, 2026
ddd580b
Add boost docs
g-despot May 28, 2026
17d2497
Implement fixes
g-despot May 28, 2026
8fe5060
Update REST API
g-despot May 31, 2026
62f1a5f
Merge branch 'main' into v1-38/main
g-despot May 31, 2026
fceb9f3
Document async replication enabled by default in v1.38
g-despot May 31, 2026
015254a
Update code examples to drop removed asyncEnabled field
g-despot May 31, 2026
29c6858
Update async replication metrics in monitoring reference
g-despot May 31, 2026
69d6921
Correct outdated FQDN node discovery info in cluster concepts
g-despot May 31, 2026
831064d
Document cross-data-center (WAN) cluster configuration
g-despot May 31, 2026
6ddec7c
Add tracking doc for removed content cleanup
g-despot May 31, 2026
b76d475
Potential fix for pull request finding
g-despot May 31, 2026
a9e4802
Merge pull request #432 from weaviate/v1-38/boost
g-despot Jun 3, 2026
ee1e613
Merge pull request #430 from weaviate/v1-38/mcp
g-despot Jun 3, 2026
8783161
Apply suggestions from code review
g-despot Jun 3, 2026
ed30e66
Merge pull request #425 from weaviate/v1-38/nested-object-filtering
g-despot Jun 3, 2026
c24a007
Address review feedback: override precedence + Multi-DC support status
g-despot Jun 3, 2026
df16292
Update docs
g-despot Jun 3, 2026
dd2c3d8
Merge pull request #434 from weaviate/v1-38/async-by-default
g-despot Jun 3, 2026
7d3fea4
Implement feedback
g-despot Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/async-replication-per-collection-config.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:::info Collection-level configuration — Added in `v1.36`
Async replication parameters can also be set per-collection via the `asyncConfig` object in `replicationConfig`. Per-collection settings override the cluster-wide environment variable defaults. See [Collection `asyncConfig` parameters](/weaviate/config-refs/collections#async-config) for details.
Async replication runs by default for any collection with a replication factor greater than `1` (as of `v1.38`). To fine-tune its behavior for a specific collection, set the `asyncConfig` object in `replicationConfig`. Cluster-wide environment variable settings override per-collection settings. See [Collection `asyncConfig` parameters](/weaviate/config-refs/collections#async-config) for details.
:::
3 changes: 0 additions & 3 deletions _includes/code/config-refs/reference.collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
),
replication_config=Configure.replication(
factor=1,
async_enabled=False,
deletion_strategy=ReplicationDeletionStrategy.TIME_BASED_RESOLUTION,
),
)
Expand Down Expand Up @@ -733,7 +732,6 @@
# highlight-start
replication_config=Configure.replication(
factor=3,
async_enabled=True,
deletion_strategy=ReplicationDeletionStrategy.TIME_BASED_RESOLUTION,
),
# highlight-end
Expand All @@ -743,7 +741,6 @@
# Test
collection = client.collections.use("Article")
config = collection.config.get()
assert config.replication_config.async_enabled == True
assert (
config.replication_config.deletion_strategy
== ReplicationDeletionStrategy.TIME_BASED_RESOLUTION
Expand Down
3 changes: 1 addition & 2 deletions _includes/code/configuration/replication-consistency.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ curl \
}
],
"replicationConfig": {
"factor": 3,
"asyncEnabled": true
"factor": 3
}
}' \
http://localhost:8080/v1/schema
Expand Down
2 changes: 1 addition & 1 deletion _includes/code/howto/go/docs/manage-data.classes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ func Test_ManageDataClasses(t *testing.T) {
articleClass := &models.Class{
Class: "Article",
Description: "Collection of articles",
// Async replication runs by default when the replication factor is greater than 1
ReplicationConfig: &models.ReplicationConfig{
AsyncEnabled: true,
Factor: 3,
DeletionStrategy: models.ReplicationConfigDeletionStrategyTimeBasedResolution,
},
Expand Down
6 changes: 1 addition & 5 deletions _includes/code/howto/manage-data.collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,9 @@
client.collections.create(
"Article",
# highlight-start
# Async replication runs by default when the replication factor is greater than 1
replication_config=Configure.replication(
factor=3,
async_enabled=True,
),
# highlight-end
)
Expand Down Expand Up @@ -819,10 +819,8 @@
# highlight-start
replication_config=Configure.replication(
factor=3,
async_enabled=True,
deletion_strategy=ReplicationDeletionStrategy.TIME_BASED_RESOLUTION,
async_config=Configure.Replication.async_config(
max_workers=5,
hashtree_height=16,
frequency=30,
),
Expand All @@ -840,7 +838,6 @@
collection.config.update(
replication_config=Reconfigure.replication(
async_config=Reconfigure.Replication.async_config(
max_workers=10,
frequency=60,
),
),
Expand All @@ -851,7 +848,6 @@
# Test
collection = client.collections.use("Article")
config = collection.config.get()
assert config.replication_config.async_enabled == True
assert (
config.replication_config.deletion_strategy
== ReplicationDeletionStrategy.TIME_BASED_RESOLUTION
Expand Down
5 changes: 1 addition & 4 deletions _includes/code/howto/manage-data.collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,9 @@ import { configure } from 'weaviate-client';
await client.collections.create({
name: 'Article',
// highlight-start
// Async replication runs by default when the replication factor is greater than 1
replication: configure.replication({
factor: 1,
asyncEnabled: true,
}),
// highlight-end
})
Expand Down Expand Up @@ -710,10 +710,8 @@ await replicationClient.collections.create({
// highlight-start
replication: configure.replication({
factor: 3,
asyncEnabled: true,
deletionStrategy: 'TimeBasedResolution',
asyncConfig: {
maxWorkers: 5,
hashtreeHeight: 16,
frequency: 30,
},
Expand All @@ -729,7 +727,6 @@ const articleReplication = replicationClient.collections.use('Article')
await articleReplication.config.update({
replication: reconfigure.replication({
asyncConfig: {
maxWorkers: 10,
frequency: 60,
},
}),
Expand Down
240 changes: 240 additions & 0 deletions _includes/code/howto/search.boost.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
# How-to: Search > Boost results — Python examples.
#
# Requires Weaviate v1.38+ and the Python client release that adds Boost
# support (PR weaviate/weaviate-python-client#2030). Boost is gRPC-only —
# REST/curl is not supported.
#
# Uses the text2vec-transformers vectorizer. Run against the local stack
# in tests/docker-compose-anon.yml (Weaviate + transformers inference).

import time
from datetime import datetime, timedelta, timezone

import weaviate
from weaviate.classes.config import Configure, DataType, Property, Tokenization
from weaviate.classes.query import Boost, Filter

client = weaviate.connect_to_local()

# ---- Fixture: an Articles collection with date + numeric properties ----
client.collections.delete("Articles")
client.collections.create(
name="Articles",
vector_config=Configure.Vectors.text2vec_transformers(),
properties=[
Property(name="title", data_type=DataType.TEXT),
Property(name="category", data_type=DataType.TEXT, tokenization=Tokenization.FIELD),
Property(name="published", data_type=DataType.DATE),
Property(name="likes", data_type=DataType.INT),
Property(name="price", data_type=DataType.NUMBER),
Property(name="draft", data_type=DataType.BOOL),
],
)

now = datetime.now(timezone.utc)
articles = client.collections.use("Articles")
articles.data.insert_many([
{"title": "Transformers explained", "category": "research", "published": now - timedelta(days=2), "likes": 100, "price": 49.99, "draft": False},
{"title": "Old transformer survey", "category": "research", "published": now - timedelta(days=400), "likes": 5000, "price": 49.99, "draft": False},
{"title": "How to fine-tune a model", "category": "tutorial", "published": now - timedelta(days=1), "likes": 30, "price": 9.99, "draft": False},
{"title": "Pricing transformers", "category": "tutorial", "published": now - timedelta(days=10), "likes": 5000000, "price": 199.0, "draft": False},
{"title": "Draft: transformer architecture","category": "research", "published": now - timedelta(days=3), "likes": 200, "price": 9.99, "draft": True},
])

# Wait briefly for the vectorizer to finish indexing the new objects.
time.sleep(3)


# ==========================================
# ===== Filter boost (soft WHERE) =====
# ==========================================

# START BoostFilter
# Promote articles in the "research" category without filtering others out.
response = articles.query.near_text(
query="transformer architectures",
limit=5,
# highlight-start
boost=Boost.filter(
Filter.by_property("category").equal("research"),
weight=0.5,
),
# highlight-end
return_properties=["title", "category"],
)

for o in response.objects:
print(o.properties["category"], "-", o.properties["title"])
# END BoostFilter

assert response.objects[0].properties["category"] == "research"


# ==========================================
# ===== Property boost (numeric value) =====
# ==========================================

# START BoostProperty
# Bias toward articles with more `likes`. LOG1P dampens the long tail so a
# single 5-million-likes outlier doesn't dominate.
response = articles.query.near_text(
query="transformer architectures",
limit=5,
# highlight-start
boost=Boost.property(
"likes",
modifier=Boost.Modifier.LOG1P,
weight=0.7,
),
# highlight-end
return_properties=["title", "likes"],
)

for o in response.objects:
print(o.properties["likes"], "-", o.properties["title"])
# END BoostProperty


# ==========================================
# ===== Time decay (boost recent docs) =====
# ==========================================

# START BoostTimeDecay
# Score decays exponentially over time. "30d scale" + decay=0.5 means an
# article that's 30 days old gets half the score of one published "now".
response = articles.query.near_text(
query="transformer architectures",
limit=5,
# highlight-start
boost=Boost.time_decay(
"published",
origin="now",
scale=timedelta(days=30),
curve=Boost.Curve.EXPONENTIAL,
decay=0.5,
weight=0.6,
),
# highlight-end
return_properties=["title", "published"],
)
# END BoostTimeDecay

# The 400-day-old "Old transformer survey" should be demoted vs the 2-day-old article.
top_titles = [o.properties["title"] for o in response.objects[:2]]
assert "Old transformer survey" not in top_titles


# ==========================================
# ===== Numeric decay (closest to a value) =====
# ==========================================

# START BoostNumericDecay
# Score peaks at a target price and falls off symmetrically. Gauss gives a
# bell-shaped falloff: items within `offset` of $49.99 score 1.0, items at
# $59.99 (one scale away) score `decay`.
response = articles.query.near_text(
query="transformer architectures",
limit=5,
# highlight-start
boost=Boost.numeric_decay(
"price",
origin=49.99,
scale=10.0,
curve=Boost.Curve.GAUSSIAN,
decay=0.5,
weight=0.5,
),
# highlight-end
return_properties=["title", "price"],
)
# END BoostNumericDecay

# Both top-2 results have the target price; the $199 outlier is pushed down.
assert all(o.properties["price"] == 49.99 for o in response.objects[:2])


# ==========================================
# ===== Blend multiple conditions =====
# ==========================================

# START BoostBlend
# Combine two soft signals: recency (weight 2) + popularity (weight 1).
# The outer weight=0.4 controls how much the blended rank affects the
# final score; the inner weights are *per-condition* and balance each
# other.
response = articles.query.near_text(
query="transformer architectures",
limit=5,
# highlight-start
boost=Boost.blend(
Boost.time_decay("published", origin="now", scale=timedelta(days=30), weight=2.0),
Boost.property("likes", modifier=Boost.Modifier.LOG1P, weight=1.0),
weight=0.4,
depth=200, # rescore the top 200 vector matches
),
# highlight-end
return_properties=["title", "likes", "published"],
)
# END BoostBlend

# Recency dominates, but the LOG1P-dampened 5M-likes article still surfaces
# in the top 3 — popularity is helping, not invisible.
assert any(o.properties["likes"] == 5_000_000 for o in response.objects[:3])


# ==========================================
# ===== Negative weights demote =====
# ==========================================

# START BoostNegativeWeight
# A negative per-condition weight pushes matching documents DOWN — they
# stay in the result set but lose ground against everything else. Use
# this to deprioritize drafts without filtering them out entirely.
response = articles.query.bm25(
query="transformer",
limit=5,
# highlight-start
boost=Boost.blend(
Boost.filter(Filter.by_property("draft").equal(True), weight=-2.0),
weight=0.5,
),
# highlight-end
return_properties=["title", "draft"],
)

# The draft article is still in results, just no longer first.
all_titles = [o.properties["title"] for o in response.objects]
assert any("Draft" in t for t in all_titles)
assert response.objects[0].properties["draft"] is False
# END BoostNegativeWeight


# ==========================================
# ===== Boost on hybrid search =====
# ==========================================

# START BoostOnHybrid
# Hybrid keeps its own alpha-blend of BM25 + vector. The boost runs once
# over the fused hybrid result — the sub-search legs don't see it.
response = articles.query.hybrid(
query="transformer architectures",
alpha=0.75,
limit=5,
# highlight-start
boost=Boost.blend(
Boost.filter(Filter.by_property("category").equal("research"), weight=1.0),
Boost.filter(Filter.by_property("draft").equal(True), weight=-2.0),
weight=0.3,
),
# highlight-end
return_properties=["title", "category", "draft"],
)
# END BoostOnHybrid

# Top result is research and not a draft — both boost legs worked.
assert response.objects[0].properties["category"] == "research"
assert response.objects[0].properties["draft"] is False


client.collections.delete("Articles")
client.close()
Loading
Loading