weaviate.collections package
- class weaviate.collections.Collection(connection: ConnectionV4, name: str, validate_arguments: bool, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None, properties: Type[Properties] | None = None, references: Type[References] | None = None)[source]
Bases:
Generic
[Properties
,References
],_CollectionBase
[Properties
,References
]The collection class is the main entry point for interacting with a collection in Weaviate.
This class is returned by the client.collections.create and client.collections.get methods. It provides access to all the methods available to you when interacting with a collection in Weaviate.
You should not need to instantiate this class yourself but it may be useful to import this as a type when performing type hinting of functions that depend on a collection object.
- Attributes:
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- aggregate_group_by
This namespace includes all the aggregate methods available to you when using Weaviate’s aggregation group-by capabilities.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- query_group_by
This namespace includes all the querying methods available to you when using Weaviate’s querying group-by capabilities.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- backup
This namespace includes all the backup methods available to you when backing up a collection in Weaviate.
- batch
This namespace contains all the functionality to upload data in batches to Weaviate for this specific collection.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[Properties, References] [source]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[Properties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[Properties, TReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[TProperties, References]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[TProperties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[TProperties, TReferences]
Use this method to return an iterator over the objects in the collection.
This iterator keeps a record of the last object that it returned to be used in each subsequent call to Weaviate. Once the collection is exhausted, the iterator exits.
If return_properties is not provided, all the properties of each object will be requested from Weaviate except for its vector as this is an expensive operation. Specify include_vector to request the vector back as well. In addition, if return_references=None then none of the references are returned. Use wvc.QueryReference to specify which references to return.
- Arguments:
- include_vector
Whether to include the vector in the metadata of the returned objects.
- return_metadata
The metadata to return with each object.
- return_properties
The properties to return with each object.
- return_references
The references to return with each object.
- after
The cursor to use to mark the initial starting point of the iterator in the collection.
- cache_size
How many objects should be fetched in each request to Weaviate during the iteration. The default is 100.
- Raises:
- weaviate.exceptions.WeaviateGRPCQueryError:
If the request to the Weaviate server fails.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- shards() List[Shard] [source]
Get the statuses of all the shards of this collection.
- Returns:
The list of shards belonging to this collection.
- Raises
- weaviate.WeaviateConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeError
If weaviate reports a none OK status.
- weaviate.EmptyResponseError
If the response is empty.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- with_consistency_level(consistency_level)
- with_tenant(tenant)
- class weaviate.collections.CollectionAsync(connection: ConnectionV4, name: str, validate_arguments: bool, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None, properties: Type[Properties] | None = None, references: Type[References] | None = None)[source]
Bases:
Generic
[Properties
,References
],_CollectionBase
[Properties
,References
]The collection class is the main entry point for interacting with a collection in Weaviate.
This class is returned by the client.collections.create and client.collections.get methods. It provides access to all the methods available to you when interacting with a collection in Weaviate.
You should not need to instantiate this class yourself but it may be useful to import this as a type when performing type hinting of functions that depend on a collection object.
- Attributes:
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- aggregate_group_by
This namespace includes all the aggregate methods available to you when using Weaviate’s aggregation group-by capabilities.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- query_group_by
This namespace includes all the querying methods available to you when using Weaviate’s querying group-by capabilities.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- backup
This namespace includes all the backup methods available to you when backing up a collection in Weaviate.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[Properties, References] [source]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[Properties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[Properties, TReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[TProperties, References]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[TProperties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[TProperties, TReferences]
Use this method to return an iterator over the objects in the collection.
This iterator keeps a record of the last object that it returned to be used in each subsequent call to Weaviate. Once the collection is exhausted, the iterator exits.
If return_properties is not provided, all the properties of each object will be requested from Weaviate except for its vector as this is an expensive operation. Specify include_vector to request the vector back as well. In addition, if return_references=None then none of the references are returned. Use wvc.QueryReference to specify which references to return.
- Arguments:
- include_vector
Whether to include the vector in the metadata of the returned objects.
- return_metadata
The metadata to return with each object.
- return_properties
The properties to return with each object.
- return_references
The references to return with each object.
- after
The cursor to use to mark the initial starting point of the iterator in the collection.
- cache_size
How many objects should be fetched in each request to Weaviate during the iteration. The default is 100.
- Raises:
- weaviate.exceptions.WeaviateGRPCQueryError:
If the request to the Weaviate server fails.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- async shards() List[Shard] [source]
Get the statuses of all the shards of this collection.
- Returns:
The list of shards belonging to this collection.
- Raises
- weaviate.WeaviateConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeError
If weaviate reports a none OK status.
- weaviate.EmptyResponseError
If the response is empty.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- with_consistency_level(consistency_level)
- with_tenant(tenant)
Subpackages
- weaviate.collections.aggregations package
- Submodules
- weaviate.collections.aggregations.base module
- weaviate.collections.aggregations.near_image module
- weaviate.collections.aggregations.near_object module
- weaviate.collections.aggregations.near_text module
- weaviate.collections.aggregations.near_vector module
- weaviate.collections.aggregations.over_all module
- weaviate.collections.batch package
- weaviate.collections.classes package
- Submodules
- weaviate.collections.classes.aggregate module
- weaviate.collections.classes.batch module
- weaviate.collections.classes.config module
BM25Config
BQConfig
CollectionConfig
CollectionConfigSimple
Configure
ConsistencyLevel
DataType
DataType.BLOB
DataType.BOOL
DataType.BOOL_ARRAY
DataType.DATE
DataType.DATE_ARRAY
DataType.GEO_COORDINATES
DataType.INT
DataType.INT_ARRAY
DataType.NUMBER
DataType.NUMBER_ARRAY
DataType.OBJECT
DataType.OBJECT_ARRAY
DataType.PHONE_NUMBER
DataType.TEXT
DataType.TEXT_ARRAY
DataType.UUID
DataType.UUID_ARRAY
GenerativeConfig
GenerativeSearches
InvertedIndexConfig
MultiTenancyConfig
NamedVectorConfig
NestedProperty
PQConfig
PQEncoderConfig
PQEncoderDistribution
PQEncoderType
Property
PropertyConfig
PropertyVectorizerConfig
Reconfigure
ReferenceProperty
ReferencePropertyConfig
ReplicationConfig
ReplicationDeletionStrategy
RerankerConfig
Rerankers
SQConfig
ShardStatus
ShardingConfig
StopwordsConfig
StopwordsPreset
Tokenization
VectorIndexConfigDynamic
VectorIndexConfigFlat
VectorIndexConfigHNSW
VectorizerConfig
- weaviate.collections.classes.config_methods module
- weaviate.collections.classes.data module
- weaviate.collections.classes.filters module
- weaviate.collections.classes.grpc module
- weaviate.collections.classes.internal module
CrossReference
CrossReferenceAnnotation
GenerativeGroup
GenerativeGroupByReturn
GenerativeNearMediaReturnType
GenerativeObject
GenerativeReturn
Group
GroupByMetadataReturn
GroupByObject
GroupByReturn
MetadataReturn
MetadataSingleObjectReturn
Object
ObjectSingleReturn
QueryNearMediaReturnType
QueryReturn
ReferenceInput
ReferenceInputs
ReferenceToMulti
- weaviate.collections.classes.orm module
- weaviate.collections.classes.tenants module
- weaviate.collections.classes.types module
- weaviate.collections.grpc package
- weaviate.collections.queries package
- Submodules
- weaviate.collections.queries.base module
- weaviate.collections.queries.bm25 module
- weaviate.collections.queries.fetch_objects module
- weaviate.collections.queries.hybrid module
- weaviate.collections.queries.near_audio module
- weaviate.collections.queries.near_image module
- weaviate.collections.queries.near_object module
- weaviate.collections.queries.near_text module
- weaviate.collections.queries.near_vector module
- weaviate.collections.queries.near_video module
Submodules
weaviate.collections.aggregate module
weaviate.collections.collection module
- class weaviate.collections.collection.Collection(connection: ConnectionV4, name: str, validate_arguments: bool, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None, properties: Type[Properties] | None = None, references: Type[References] | None = None)[source]
Bases:
Generic
[Properties
,References
],_CollectionBase
[Properties
,References
]The collection class is the main entry point for interacting with a collection in Weaviate.
This class is returned by the client.collections.create and client.collections.get methods. It provides access to all the methods available to you when interacting with a collection in Weaviate.
You should not need to instantiate this class yourself but it may be useful to import this as a type when performing type hinting of functions that depend on a collection object.
- Attributes:
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- aggregate_group_by
This namespace includes all the aggregate methods available to you when using Weaviate’s aggregation group-by capabilities.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- query_group_by
This namespace includes all the querying methods available to you when using Weaviate’s querying group-by capabilities.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- backup
This namespace includes all the backup methods available to you when backing up a collection in Weaviate.
- batch
This namespace contains all the functionality to upload data in batches to Weaviate for this specific collection.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[Properties, References] [source]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[Properties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[Properties, TReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[TProperties, References]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[TProperties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectIterator[TProperties, TReferences]
Use this method to return an iterator over the objects in the collection.
This iterator keeps a record of the last object that it returned to be used in each subsequent call to Weaviate. Once the collection is exhausted, the iterator exits.
If return_properties is not provided, all the properties of each object will be requested from Weaviate except for its vector as this is an expensive operation. Specify include_vector to request the vector back as well. In addition, if return_references=None then none of the references are returned. Use wvc.QueryReference to specify which references to return.
- Arguments:
- include_vector
Whether to include the vector in the metadata of the returned objects.
- return_metadata
The metadata to return with each object.
- return_properties
The properties to return with each object.
- return_references
The references to return with each object.
- after
The cursor to use to mark the initial starting point of the iterator in the collection.
- cache_size
How many objects should be fetched in each request to Weaviate during the iteration. The default is 100.
- Raises:
- weaviate.exceptions.WeaviateGRPCQueryError:
If the request to the Weaviate server fails.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- shards() List[Shard] [source]
Get the statuses of all the shards of this collection.
- Returns:
The list of shards belonging to this collection.
- Raises
- weaviate.WeaviateConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeError
If weaviate reports a none OK status.
- weaviate.EmptyResponseError
If the response is empty.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- with_consistency_level(consistency_level)
- with_tenant(tenant)
- class weaviate.collections.collection.CollectionAsync(connection: ConnectionV4, name: str, validate_arguments: bool, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None, properties: Type[Properties] | None = None, references: Type[References] | None = None)[source]
Bases:
Generic
[Properties
,References
],_CollectionBase
[Properties
,References
]The collection class is the main entry point for interacting with a collection in Weaviate.
This class is returned by the client.collections.create and client.collections.get methods. It provides access to all the methods available to you when interacting with a collection in Weaviate.
You should not need to instantiate this class yourself but it may be useful to import this as a type when performing type hinting of functions that depend on a collection object.
- Attributes:
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- aggregate_group_by
This namespace includes all the aggregate methods available to you when using Weaviate’s aggregation group-by capabilities.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- query_group_by
This namespace includes all the querying methods available to you when using Weaviate’s querying group-by capabilities.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- aggregate
This namespace includes all the querying methods available to you when using Weaviate’s standard aggregation capabilities.
- backup
This namespace includes all the backup methods available to you when backing up a collection in Weaviate.
- config
This namespace includes all the CRUD methods available to you when modifying the configuration of the collection in Weaviate.
- data
This namespace includes all the CUD methods available to you when modifying the data of the collection in Weaviate.
- generate
This namespace includes all the querying methods available to you when using Weaviate’s generative capabilities.
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[Properties, References] [source]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[Properties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Sequence[str | QueryNested] | str | QueryNested | None = None, return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[Properties, TReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Literal[None] = None, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[TProperties, References]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget, after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[TProperties, CrossReferences]
- iterator(include_vector: bool = False, return_metadata: List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | MetadataQuery | None = None, *, return_properties: Type[TProperties], return_references: Type[TReferences], after: str | UUID | None = None, cache_size: int | None = None) _ObjectAIterator[TProperties, TReferences]
Use this method to return an iterator over the objects in the collection.
This iterator keeps a record of the last object that it returned to be used in each subsequent call to Weaviate. Once the collection is exhausted, the iterator exits.
If return_properties is not provided, all the properties of each object will be requested from Weaviate except for its vector as this is an expensive operation. Specify include_vector to request the vector back as well. In addition, if return_references=None then none of the references are returned. Use wvc.QueryReference to specify which references to return.
- Arguments:
- include_vector
Whether to include the vector in the metadata of the returned objects.
- return_metadata
The metadata to return with each object.
- return_properties
The properties to return with each object.
- return_references
The references to return with each object.
- after
The cursor to use to mark the initial starting point of the iterator in the collection.
- cache_size
How many objects should be fetched in each request to Weaviate during the iteration. The default is 100.
- Raises:
- weaviate.exceptions.WeaviateGRPCQueryError:
If the request to the Weaviate server fails.
- query
This namespace includes all the querying methods available to you when using Weaviate’s standard query capabilities.
- async shards() List[Shard] [source]
Get the statuses of all the shards of this collection.
- Returns:
The list of shards belonging to this collection.
- Raises
- weaviate.WeaviateConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeError
If weaviate reports a none OK status.
- weaviate.EmptyResponseError
If the response is empty.
- tenants
This namespace includes all the CRUD methods available to you when modifying the tenants of a multi-tenancy-enabled collection in Weaviate.
- with_consistency_level(consistency_level)
- with_tenant(tenant)