Skip to content

Commit 070cbb8

Browse files
committed
Rename spfresh to hfresh
1 parent 6d6afeb commit 070cbb8

File tree

9 files changed

+42
-42
lines changed

9 files changed

+42
-42
lines changed

weaviate/collections/classes/config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
_VectorIndexConfigDynamicUpdate,
4646
_VectorIndexConfigFlatUpdate,
4747
_VectorIndexConfigHNSWUpdate,
48-
_VectorIndexConfigSPFreshUpdate,
48+
_VectorIndexConfigHFreshUpdate,
4949
_VectorIndexConfigUpdate,
5050
)
5151
from weaviate.collections.classes.config_vector_index import (
@@ -1888,7 +1888,7 @@ def vector_index_type() -> str:
18881888
VectorIndexConfigHNSW = _VectorIndexConfigHNSW
18891889

18901890
@dataclass
1891-
class _VectorIndexConfigSPFresh(_VectorIndexConfig):
1891+
class _VectorIndexConfigHFresh(_VectorIndexConfig):
18921892
distance_metric: VectorDistances
18931893
max_posting_size: int
18941894
min_posting_size: int
@@ -1900,7 +1900,7 @@ class _VectorIndexConfigSPFresh(_VectorIndexConfig):
19001900
def vector_index_type() -> str:
19011901
return VectorIndexType.SPFRESH.value
19021902

1903-
VectorIndexConfigSPFresh = _VectorIndexConfigSPFresh
1903+
VectorIndexConfigHFresh = _VectorIndexConfigHFresh
19041904

19051905
@dataclass
19061906
class _VectorIndexConfigFlat(_VectorIndexConfig):
@@ -1975,7 +1975,7 @@ def to_dict(self) -> Dict[str, Any]:
19751975
class _NamedVectorConfig(_ConfigBase):
19761976
vectorizer: _NamedVectorizerConfig
19771977
vector_index_config: Union[
1978-
VectorIndexConfigHNSW, VectorIndexConfigFlat, VectorIndexConfigDynamic, VectorIndexConfigSPFresh
1978+
VectorIndexConfigHNSW, VectorIndexConfigFlat, VectorIndexConfigDynamic, VectorIndexConfigHFresh
19791979
]
19801980

19811981
def to_dict(self) -> Dict:
@@ -2000,7 +2000,7 @@ class _CollectionConfig(_ConfigBase):
20002000
reranker_config: Optional[RerankerConfig]
20012001
sharding_config: Optional[ShardingConfig]
20022002
vector_index_config: Union[
2003-
VectorIndexConfigHNSW, VectorIndexConfigFlat, VectorIndexConfigDynamic, VectorIndexConfigSPFresh, None
2003+
VectorIndexConfigHNSW, VectorIndexConfigFlat, VectorIndexConfigDynamic, VectorIndexConfigHFresh, None
20042004
]
20052005
vector_index_type: Optional[VectorIndexType]
20062006
vectorizer_config: Optional[VectorizerConfig]
@@ -2641,21 +2641,21 @@ def dynamic(
26412641
)
26422642

26432643
@staticmethod
2644-
def spfresh(
2644+
def hfresh(
26452645
max_posting_size: Optional[int] = None,
26462646
min_posting_size: Optional[int] = None,
26472647
rng_factor: Optional[int] = None,
26482648
search_probe: Optional[int] = None,
26492649
quantizer: Optional[_RQConfigUpdate] = None,
2650-
) -> _VectorIndexConfigSPFreshUpdate:
2651-
"""Create an `_VectorIndexConfigSPFreshUpdate` object to update the configuration of the SPFresh vector index.
2650+
) -> _VectorIndexConfigHFreshUpdate:
2651+
"""Create an `_VectorIndexConfigHFreshUpdate` object to update the configuration of the HFresh vector index.
26522652
26532653
Use this method when defining the `vectorizer_config` argument in `collection.update()`.
26542654
26552655
Args:
26562656
See [the docs](https://weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index) for a more detailed view!
26572657
""" # noqa: D417 (missing argument descriptions in the docstring)
2658-
return _VectorIndexConfigSPFreshUpdate(
2658+
return _VectorIndexConfigHFreshUpdate(
26592659
maxPostingSize=max_posting_size,
26602660
minPostingSize=min_posting_size,
26612661
rngFactor=rng_factor,

weaviate/collections/classes/config_methods.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
_VectorIndexConfigDynamic,
4040
_VectorIndexConfigFlat,
4141
_VectorIndexConfigHNSW,
42-
_VectorIndexConfigSPFresh,
42+
_VectorIndexConfigHFresh,
4343
_VectorizerConfig,
4444
)
4545

@@ -211,9 +211,9 @@ def __get_hnsw_config(config: Dict[str, Any]) -> _VectorIndexConfigHNSW:
211211
multi_vector=__get_multivector(config),
212212
)
213213

214-
def __get_spfresh_config(config: Dict[str, Any]) -> _VectorIndexConfigSPFresh:
214+
def __get_hfresh_config(config: Dict[str, Any]) -> _VectorIndexConfigHFresh:
215215
quantizer = __get_quantizer_config(config)
216-
return _VectorIndexConfigSPFresh(
216+
return _VectorIndexConfigHFresh(
217217
distance_metric=VectorDistances(config.get("distance")),
218218
max_posting_size=config["maxPostingSize"],
219219
min_posting_size=config["minPostingSize"],
@@ -236,7 +236,7 @@ def __get_flat_config(config: Dict[str, Any]) -> _VectorIndexConfigFlat:
236236

237237
def __get_vector_index_config(
238238
schema: Dict[str, Any],
239-
) -> Union[_VectorIndexConfigHNSW, _VectorIndexConfigFlat, _VectorIndexConfigDynamic, _VectorIndexConfigSPFresh, None]:
239+
) -> Union[_VectorIndexConfigHNSW, _VectorIndexConfigFlat, _VectorIndexConfigDynamic, _VectorIndexConfigHFresh, None]:
240240
if "vectorIndexConfig" not in schema:
241241
return None
242242
if schema["vectorIndexType"] == "hnsw":
@@ -250,8 +250,8 @@ def __get_vector_index_config(
250250
hnsw=__get_hnsw_config(schema["vectorIndexConfig"]["hnsw"]),
251251
flat=__get_flat_config(schema["vectorIndexConfig"]["flat"]),
252252
)
253-
elif schema["vectorIndexType"] == "spfresh":
254-
return __get_spfresh_config(schema["vectorIndexConfig"])
253+
elif schema["vectorIndexType"] == "hfresh":
254+
return __get_hfresh_config(schema["vectorIndexConfig"])
255255
else:
256256
return None
257257

weaviate/collections/classes/config_named_vectors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
_VectorIndexConfigDynamicUpdate,
1616
_VectorIndexConfigFlatUpdate,
1717
_VectorIndexConfigHNSWUpdate,
18-
_VectorIndexConfigSPFreshUpdate,
18+
_VectorIndexConfigHFreshUpdate,
1919
_VectorIndexConfigUpdate,
2020
)
2121
from weaviate.collections.classes.config_vectorizers import (
@@ -1339,7 +1339,7 @@ def update(
13391339
*,
13401340
vector_index_config: Union[
13411341
_VectorIndexConfigHNSWUpdate,
1342-
_VectorIndexConfigSPFreshUpdate,
1342+
_VectorIndexConfigHFreshUpdate,
13431343
_VectorIndexConfigFlatUpdate,
13441344
_VectorIndexConfigDynamicUpdate,
13451345
],

weaviate/collections/classes/config_vector_index.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class VectorIndexType(str, Enum):
4141
HNSW = "hnsw"
4242
FLAT = "flat"
4343
DYNAMIC = "dynamic"
44-
SPFRESH = "spfresh"
44+
SPFRESH = "hfresh"
4545

4646

4747
class _MultiVectorConfigCreateBase(_ConfigCreateModel):
@@ -130,7 +130,7 @@ def vector_index_type() -> VectorIndexType:
130130
return VectorIndexType.HNSW
131131

132132

133-
class _VectorIndexConfigSPFreshCreate(_VectorIndexConfigCreate):
133+
class _VectorIndexConfigHFreshCreate(_VectorIndexConfigCreate):
134134
maxPostingSize: Optional[int]
135135
minPostingSize: Optional[int]
136136
replicas: Optional[int]
@@ -164,7 +164,7 @@ def vector_index_type() -> VectorIndexType:
164164
return VectorIndexType.HNSW
165165

166166

167-
class _VectorIndexConfigSPFreshUpdate(_VectorIndexConfigUpdate):
167+
class _VectorIndexConfigHFreshUpdate(_VectorIndexConfigUpdate):
168168
maxPostingSize: Optional[int]
169169
minPostingSize: Optional[int]
170170
rngFactor: Optional[int]
@@ -591,7 +591,7 @@ def hnsw(
591591
)
592592

593593
@staticmethod
594-
def spfresh(
594+
def hfresh(
595595
distance_metric: Optional[VectorDistances] = None,
596596
max_posting_size: Optional[int] = None,
597597
min_posting_size: Optional[int] = None,
@@ -601,15 +601,15 @@ def spfresh(
601601
quantizer: Optional[_QuantizerConfigCreate] = None,
602602
multi_vector: Optional[_MultiVectorConfigCreate] = None,
603603

604-
) -> _VectorIndexConfigSPFreshCreate:
605-
"""Create a `_VectorIndexConfigSPFreshCreate` object to be used when defining the SPFresh vector index configuration of Weaviate.
604+
) -> _VectorIndexConfigHFreshCreate:
605+
"""Create a `_VectorIndexConfigHFreshCreate` object to be used when defining the HFresh vector index configuration of Weaviate.
606606
607607
Use this method when defining the `vector_index_config` argument in `collections.create()`.
608608
609609
Args:
610-
See [the docs](https://weaviate.io/developers/weaviate/configuration/indexes#how-to-configure-spfresh) for a more detailed view!
610+
See [the docs](https://weaviate.io/developers/weaviate/configuration/indexes#how-to-configure-hfresh) for a more detailed view!
611611
"""
612-
return _VectorIndexConfigSPFreshCreate(
612+
return _VectorIndexConfigHFreshCreate(
613613
distance=distance_metric,
614614
maxPostingSize=max_posting_size,
615615
minPostingSize=min_posting_size,

weaviate/collections/classes/config_vectors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
_VectorIndexConfigFlatUpdate,
2121
_VectorIndexConfigHNSWCreate,
2222
_VectorIndexConfigHNSWUpdate,
23-
_VectorIndexConfigSPFreshCreate,
24-
_VectorIndexConfigSPFreshUpdate,
23+
_VectorIndexConfigHFreshCreate,
24+
_VectorIndexConfigHFreshUpdate,
2525
_VectorIndexConfigUpdate,
2626
)
2727
from weaviate.collections.classes.config_vectorizers import (
@@ -129,8 +129,8 @@ def __hnsw(
129129
)
130130

131131
@staticmethod
132-
def __spfresh(*, quantizer: Optional[_QuantizerConfigCreate]) -> _VectorIndexConfigSPFreshCreate:
133-
return _VectorIndexConfigSPFreshCreate(
132+
def __hfresh(*, quantizer: Optional[_QuantizerConfigCreate]) -> _VectorIndexConfigHFreshCreate:
133+
return _VectorIndexConfigHFreshCreate(
134134
distance_metric=None,
135135
maxPostingSize=None,
136136
minPostingSize=None,
@@ -1776,7 +1776,7 @@ def update(
17761776
name: Optional[str] = None,
17771777
vector_index_config: Union[
17781778
_VectorIndexConfigHNSWUpdate,
1779-
_VectorIndexConfigSPFreshUpdate,
1779+
_VectorIndexConfigHFreshUpdate,
17801780
_VectorIndexConfigFlatUpdate,
17811781
_VectorIndexConfigDynamicUpdate,
17821782
],

weaviate/collections/config/async_.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ from weaviate.collections.classes.config import (
2121
_VectorConfigUpdate,
2222
_VectorIndexConfigFlatUpdate,
2323
_VectorIndexConfigHNSWUpdate,
24-
_VectorIndexConfigSPFreshUpdate,
24+
_VectorIndexConfigHFreshUpdate,
2525
)
2626
from weaviate.collections.classes.config_vector_index import _VectorIndexConfigDynamicUpdate
2727
from weaviate.connect.v4 import ConnectionAsync
@@ -46,14 +46,14 @@ class _ConfigCollectionAsync(_ConfigCollectionExecutor[ConnectionAsync]):
4646
multi_tenancy_config: Optional[_MultiTenancyConfigUpdate] = None,
4747
replication_config: Optional[_ReplicationConfigUpdate] = None,
4848
vector_index_config: Optional[
49-
Union[_VectorIndexConfigHNSWUpdate, _VectorIndexConfigFlatUpdate, _VectorIndexConfigSPFreshUpdate]
49+
Union[_VectorIndexConfigHNSWUpdate, _VectorIndexConfigFlatUpdate, _VectorIndexConfigHFreshUpdate]
5050
] = None,
5151
vectorizer_config: Optional[
5252
Union[
5353
_VectorIndexConfigHNSWUpdate,
5454
_VectorIndexConfigFlatUpdate,
5555
_VectorIndexConfigDynamicUpdate,
56-
_VectorIndexConfigSPFreshUpdate,
56+
_VectorIndexConfigHFreshUpdate,
5757
List[_NamedVectorConfigUpdate],
5858
]
5959
] = None,

weaviate/collections/config/executor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
_VectorConfigUpdate,
3939
_VectorIndexConfigFlatUpdate,
4040
_VectorIndexConfigHNSWUpdate,
41-
_VectorIndexConfigSPFreshUpdate,
41+
_VectorIndexConfigHFreshUpdate,
4242
)
4343
from weaviate.collections.classes.config_methods import (
4444
_collection_config_from_json,
@@ -135,15 +135,15 @@ def update(
135135
Union[
136136
_VectorIndexConfigHNSWUpdate,
137137
_VectorIndexConfigFlatUpdate,
138-
_VectorIndexConfigSPFreshUpdate,
138+
_VectorIndexConfigHFreshUpdate,
139139
]
140140
] = None,
141141
vectorizer_config: Optional[
142142
Union[
143143
_VectorIndexConfigHNSWUpdate,
144144
_VectorIndexConfigFlatUpdate,
145145
_VectorIndexConfigDynamicUpdate,
146-
_VectorIndexConfigSPFreshUpdate,
146+
_VectorIndexConfigHFreshUpdate,
147147
List[_NamedVectorConfigUpdate],
148148
]
149149
] = None,
@@ -187,7 +187,7 @@ def update(
187187
_VectorIndexConfigHNSWUpdate,
188188
_VectorIndexConfigFlatUpdate,
189189
_VectorIndexConfigDynamicUpdate,
190-
_VectorIndexConfigSPFreshUpdate,
190+
_VectorIndexConfigHFreshUpdate,
191191
),
192192
):
193193
_Warnings.vectorizer_config_in_config_update()

weaviate/collections/config/sync.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ from weaviate.collections.classes.config import (
2121
_VectorConfigUpdate,
2222
_VectorIndexConfigFlatUpdate,
2323
_VectorIndexConfigHNSWUpdate,
24-
_VectorIndexConfigSPFreshUpdate,
24+
_VectorIndexConfigHFreshUpdate,
2525
)
2626
from weaviate.collections.classes.config_vector_index import _VectorIndexConfigDynamicUpdate
2727
from weaviate.connect.v4 import ConnectionSync
@@ -44,14 +44,14 @@ class _ConfigCollection(_ConfigCollectionExecutor[ConnectionSync]):
4444
multi_tenancy_config: Optional[_MultiTenancyConfigUpdate] = None,
4545
replication_config: Optional[_ReplicationConfigUpdate] = None,
4646
vector_index_config: Optional[
47-
Union[_VectorIndexConfigHNSWUpdate, _VectorIndexConfigFlatUpdate, _VectorIndexConfigSPFreshUpdate]
47+
Union[_VectorIndexConfigHNSWUpdate, _VectorIndexConfigFlatUpdate, _VectorIndexConfigHFreshUpdate]
4848
] = None,
4949
vectorizer_config: Optional[
5050
Union[
5151
_VectorIndexConfigHNSWUpdate,
5252
_VectorIndexConfigFlatUpdate,
5353
_VectorIndexConfigDynamicUpdate,
54-
_VectorIndexConfigSPFreshUpdate,
54+
_VectorIndexConfigHFreshUpdate,
5555
List[_NamedVectorConfigUpdate],
5656
]
5757
] = None,

weaviate/outputs/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
VectorDistances,
2424
VectorIndexConfigFlat,
2525
VectorIndexConfigHNSW,
26-
VectorIndexConfigSPFresh,
26+
VectorIndexConfigHFresh,
2727
VectorIndexType,
2828
VectorizerConfig,
2929
Vectorizers,
@@ -53,7 +53,7 @@
5353
"ShardTypes",
5454
"VectorDistances",
5555
"VectorIndexConfigHNSW",
56-
"VectorIndexConfigSPFresh",
56+
"VectorIndexConfigHFresh",
5757
"VectorIndexConfigFlat",
5858
"VectorIndexType",
5959
"Vectorizers",

0 commit comments

Comments
 (0)