Skip to content

Commit 2bcd33c

Browse files
committed
Fix update spfresh method
1 parent f07d50d commit 2bcd33c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

weaviate/collections/classes/config.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,29 @@ def dynamic(
23492349
quantizer=quantizer,
23502350
)
23512351

2352+
@staticmethod
2353+
def spfresh(
2354+
max_posting_size: Optional[int] = None,
2355+
min_posting_size: Optional[int] = None,
2356+
rng_factor: Optional[int] = None,
2357+
search_probe: Optional[int] = None,
2358+
quantizer: Optional[_RQConfigUpdate] = None,
2359+
) -> _VectorIndexConfigSPFreshUpdate:
2360+
"""Create an `_VectorIndexConfigSPFreshUpdate` object to update the configuration of the SPFresh vector index.
2361+
2362+
Use this method when defining the `vectorizer_config` argument in `collection.update()`.
2363+
2364+
Args:
2365+
See [the docs](https://weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index) for a more detailed view!
2366+
""" # noqa: D417 (missing argument descriptions in the docstring)
2367+
return _VectorIndexConfigSPFreshUpdate(
2368+
maxPostingSize=max_posting_size,
2369+
minPostingSize=min_posting_size,
2370+
rngFactor=rng_factor,
2371+
searchProbe=search_probe,
2372+
quantizer=quantizer,
2373+
)
2374+
23522375

23532376
class Reconfigure:
23542377
"""Use this factory class to generate the correct `xxxConfig` object for use when using the `collection.update()` method.

0 commit comments

Comments
 (0)