-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement to the weaviate datatypes support (text[], object, object[]) with WeaviateDocumentIndex #1849
Comments
Can u give an example of the |
Sure: class SampleDoc(BaseDoc):
allergies: Optional[List[str]] = [] This object should result into a text[] data type in the WeaviateDocumentIndex. let's assume a value of ['glutenfree','peanutfree'] in the array. Then I would be able to do a filter with ContainsAny or ContainsAll on that Field within my search or filter request to find all objects which contain all of the allergenfree terms: filter = {
"path":["allergies"],
"operator": "ContainsAll",
"valueText": ['glutenfree','peanutfree']
} |
The point is right now that this type is cureently only handled as |
FWIW, after the initial release of the docarray-weaviate integration, weaviate has added support for nested objects, so they don't have to be stored as blobs anymore. However, they can't be filtered upon yet. However, in @vincetrep example, the thing he wants to filter on is a list of texts, and this is already supported in weaviate's python client. |
Hey @hsm207, Is this change something easy to achieve? |
hey @JoanFM I don't think I'm in a position to give good estimates anymore. It's almost a year since I last worked on this and I'm not sure how the abstractions work anymore 🤣 maybe @JohannesMessner knows better? |
Initial Checks
Description
There is a limitation with the translation of docarray data types with the data types in weaviate.
Currently the list of datatypes is limited to the list included here:
docarray/index/backends/weaviate.py line 247
line 710
line 197 create_schema
The lists outlined above are more limited than the supported data types in weaviate:
https://weaviate.io/developers/weaviate/config-refs/datatypes
We are looking to support text[] -> list of strings, object and object[] data types in order to fully leverage the weaviate storage.
One of the motivations is to have simpler data storage and also to be able to make use of weaviate's new filters : ContainsAny, ContainsAll - https://weaviate.io/developers/weaviate/api/graphql/filters#filter-structure
At the moment we need to serialize our array as a string and use Like operators which is not ideal and detrimental to performance of queries.
These filters are essentially to find conditions within arrays of values. These data types (object[] and text[] aren't supported when indexing data with the WeaviateDocumentIndex.
Affected Components
The text was updated successfully, but these errors were encountered: