Changelog¶
Version 3.5.0¶
This minor version contains functionality for the new features introduced in Weaviate v1.13.0
.
- New
Batch
methoddelete_objects()
to delete all objects that match a particular expression (where
filter). - New
GetBuilder
methodwith_sort()
that allows sorting data on a particular field/s. - New
AggregateBuilder
methodwith_near_text()
that allows to aggregate data that is matchingnearText
filter. - New
AggregateBuilder
methodwith_near_object()
that allows to aggregate data that is matchingnearObject
filter. - New
AggregateBuilder
methodwith_near_vector()
that allows to aggregate data that is matchingnearVector
filter.
Version 3.4.2¶
exists()
.Version 3.4.1¶
exists()
.Version 3.4.0¶
invertedIndexConfig
field.get_class_shards()
to get all shards configuration of a particular class.update_class_shard()
to update one/all shard/s configuration of a particular class.tokenization
.Version 3.3.3¶
Version 3.3.2¶
DataObject
too i.e. UUIDs without hyphens.Version 3.3.1¶
Version 3.3.0¶
with_offset()
for the Get
queries. This method should be used
with the with_limit()
. This new feature (introduced in weaviate version 1.8.0
) allows to
use pagination functionality with the Get
queries. The offset
represents the start index of the objects to be returned,
and the number of objects is specified by the with_limit()
method.limit: 10
. Then, to “display the second page of 10”, set offset: 10, limit: 10
and so on. E.g.
to show the 9th page of 10 results, set offset: 80, limit: 10
to effectively display results 81-90.Version 3.2.5¶
This patch fixes the 'Batch' object is not callable
error.
Version 3.2.4¶
class_name
and cross-refs dataType
are implicitly capitalized. (This functionality is added because if class_name
is not capitalized
then Weaviate server does it for you, and this was leading to errors where the client and server have different configurations.)Fixes/updates in Schema
class:
- This patch fixes the
contains()
to accept separate class schemas as argument i.e. it does not expect to have only this format:{"classes": [CLASS_1, CLASS_2, ...]}
; now it is possible to pass justCLASS_X
as well.
Version 3.2.3¶
This patch fixes the with_near_object()
. It uses now explicit string literals for id
/beacon
in nearoOject clauses.
Version 3.2.2¶
This patch adds support for array data types: boolean[]
, date[]
.
Version 3.2.1¶
This patch adds support for array data types: int[]
, number[]
, text[]
, string[]
.
Version 3.2.0¶
Fixes/updates in WCS
class:
Fixed progress bar for
create()
, it is being updated in Notebooks too, instead of printing each iteration on new line.Method
create()
now prints the creation status above the bar.
Updates in gql
sub-package:
# with 'nearText' filter
client.query\
.get('Article', ['title', 'author'])\
.near_text(
{
'concepts': ['Ecconomy'],
'autocorrect': True
}
)
# the concept should be corrected to 'Economy'
# with 'ask' filter
client.query\
.get('Article', ['title', 'author'])\
.with_ask(
{
'question': 'When was the last financial crysis?',
'autocorrect': True
}
)
# the question should be corrected to 'When was the last financial crisis?'
- New method
with_additional()
is added to GET the _additional properties. Usage example:
# single additional property with this GraphQL query
'''
{
Get {
Article {
title
author
_additional {
id
}
}
}
}
'''
client.query\
.get('Article', ['title', 'author'])\
.with_additional('id') # argument as `str`
# multiple additional property with this GraphQL query
'''
{
Get {
Article {
title
author
_additional {
id
certainty
}
}
}
}
'''
client.query\
.get('Article', ['title', 'author'])\
.with_additional(['id', 'certainty']) # argument as `List[str]`
# additional properties as clause with this GraphQL query
'''
{
Get {
Article {
title
author
_additional {
classification {
basedOn
classifiedFields
completed
id
scope
}
}
}
}
}
'''
client.query\
.get('Article', ['title', 'author'])\
.with_additional(
{
'classification' : [
'basedOn',
'classifiedFields',
'completed',
'id',
'scope'
]
}
) # argument as `Dict[str, List[str]]`
# or with this GraphQL query
'''
{
Get {
Article {
title
author
_additional {
classification {
completed
}
}
}
}
}
'''
client.query\
.get('Article', ['title', 'author'])\
.with_additional(
{
'classification' : 'completed'
}
) # argument as `Dict[str, str]`
# additional properties as clause and clause settings with this GraphQL query
'''
{
Get {
Article {
title
author
_additional {
token (
properties: ["content"]
limit: 10
certainty: 0.8
) {
certainty
endPosition
entity
property
startPosition
word
}
}
}
}
}
'''
clause = {
'token': [
'certainty',
'endPosition',
'entity',
'property',
'startPosition',
'word',
]
}
settings = {
'properties': ["content"], # is required
'limit': 10, # optional, int
'certainty': 0.8 # optional, float
}
client.query\
.get('Article', ['title', 'author'])\
.with_additional(
(clause, settings)
) # argument as `Tuple[Dict[str, List[str]], Dict[str, Any]]`
# if the desired clause does not match any example above, then the clause can always
# be converted to string before passing it to the `.with_additional` method
Version 3.1.1¶
- Fixes in
WCS
class: - Make
WCS
’s methods’ argumentcluster_name
case insensitive (lowercased inside the method) to match Weaviate Cloud Service’ naming convention, this fixes the error when Weaviate Cloud Service lowercases thecluster_name
but the users are not aware of this and get the exception KeyError.
- Fixes in
Version 3.1.0¶
- New
Batch
methods: pop_object()
/pop_reference()
to remove and return an added object/reference from theBatch
at positionindex
(by default-1
).empty_objects()
/empty_references()
to remove all the existing objects/references from theBatch
instance.is_empty_objects()
/is_empty_references()
to check there are any objects/references in theBatch
instance.
- New
- Fixes in
WCS
class: Authentication only with
AuthClientPassword
.The
get_cluster_config()
does not raise an exception if the cluster does not exist but returns a empty configuration.The
delete_cluster()
does not raise an exception if the cluster does not exist.
- Fixes in
Add
phoneNumber
to the Weaviate’s primitive types. Thanks to GitHub user @cdpierse.Bug fix in
Connection
.Fix
ConnectionError
handling.Optimization in
weaviate.batch.requests
andweaviate.connect.connection
.
Version 3.0.0¶
weaviate.tools
module is REMOVED.Batcher
class is REMOVED.WCS
class is moved from theweaviate.tools
to the new moduleweaviate.wcs
weaviate.tools.generate_uuid
is REMOVED.
weaviate.util.generate_uuid5()
is ADDED.- New
Batch
class implementation to replace the old one. This implementation uses theBatchRequest
objects under the hood, which means that there is no need to createBatchRequest
’s anymore. This new class implementation allows 3 different batch creations methods: manual, auto-create and auto-create with dynamic batching. See theBatch
documentation for more information. BatchRequest
classes (ObjectsBatchRequest
andReferenceBatchRequest
) are hidden from the user and should not be used anymore. This is due to the newBatch
class implementation.- New
Schema
field is ADDED, “shardingConfig”. It can bu used with Weaviate version >= 1.6.0. - New method
update_config()
used to update mutable schema configuration (like efConstruction, …).