Skip to content
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

Cannot delete objects by filter #13

Open
anna-geller opened this issue Oct 31, 2023 · 1 comment
Open

Cannot delete objects by filter #13

anna-geller opened this issue Oct 31, 2023 · 1 comment
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working

Comments

@anna-geller
Copy link
Member

Expected Behavior

Something seems wrong in this part:

https://github.com/kestra-io/plugin-weaviate/blob/master/src/main/java/io/kestra/plugin/weaviate/Delete.java#L101-L106

https://weaviate.io/developers/weaviate/manage-data/delete#delete-multiple-objects

Actual Behaviour

Reproducer: first insert movies

id: weaviate-insert
namespace: dev

inputs:
  - name: weaviateClusterUrl
    type: STRING
    defaults: https://demo-c0geejdk.weaviate.network
  - name: weaviateApiKey
    type: STRING
    defaults: "{{ secret('WEAVIATE_API_KEY') }}"


tasks:
  - id: insertWeaviateMovies
    type: io.kestra.plugin.weaviate.BatchCreate
    url: "{{ inputs.weaviateClusterUrl }}"
    apiKey: "{{ inputs.weaviateApiKey }}"
    className: Movies
    objects:
      - name: "The Shawshank Redemption"
        description: "Over the course of several years, two convicts form a friendship, seeking consolation and, eventually, redemption through basic compassion."
        category: "Drama"
      - name: "The Godfather"
        description: "Don Vito Corleone, head of a mafia family, decides to hand over his empire to his youngest son Michael. However, his decision unintentionally puts the lives of his loved ones in grave danger."
        category: "Crime"
      - name: "The Dark Knight"
        description: "When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, Batman must accept one of the greatest psychological and physical tests of his ability to fight injustice."
        category: "Action"

Steps To Reproduce

now try to delete Shawshank:

id: weaviate-delete
namespace: dev

inputs:
  - name: weaviateClusterUrl
    type: STRING
    defaults: https://demo-c0geejdk.weaviate.network
  - name: weaviateApiKey
    type: STRING
    defaults: "{{ secret('WEAVIATE_API_KEY') }}"


tasks:
  - id: deleteWeaviateMovie
    type: io.kestra.plugin.weaviate.Delete
    url: "{{ inputs.weaviateClusterUrl }}"
    apiKey: "{{ inputs.weaviateApiKey }}"
    className: Movies
    filter:
      name: "The Shawshank Redemption"

success is false, nothing got deleted:
image

Environment Information

  • Kestra Version: 0.13.0
  • Plugin version:
  • Operating System (OS / Docker / Kubernetes):
  • Java Version (If not docker):

Example flow

No response

@anna-geller anna-geller added the bug Something isn't working label Oct 31, 2023
@anna-geller anna-geller added this to the v0.16.0 milestone Dec 5, 2023
@anna-geller anna-geller modified the milestones: v0.16.0, v0.19.0 Jan 15, 2024
@shrutimantri
Copy link
Contributor

This also doesn't work if no filter is provided. If no filter is provided, all the objects of the className should be deleted. But no object gets deleted.

@github-project-automation github-project-automation bot moved this to Backlog in Issues Jun 10, 2024
@anna-geller anna-geller removed this from the v0.19.0 milestone Aug 15, 2024
@anna-geller anna-geller added the area/plugin Plugin-related issue or feature request label Aug 15, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Issues Aug 21, 2024
@loicmathieu loicmathieu reopened this Aug 21, 2024
@github-project-automation github-project-automation bot moved this from Done to Backlog in Issues Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants