Skip to content

Knowledge created in versions prior to 1.9.1 is not usable after upgrading to 1.9.2 #27291

Closed

Description

@kurokobo

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Deploy fresh 1.9.1 (or older) of Dify with default VDB (Weaviate 1.19.0)
  2. Create Knowledge and upload document
  3. Ensure Retreival Testing works
  4. Upgrade Dify to 1.9.2
  5. Try Retreival Testing in the existing Knowledge

✔️ Expected Behavior

Retreival Testing works.

❌ Actual Behavior

Query call with protocol GRPC search failed with message extract target vectors: class Vector_index_b7ff402a_fea1_44f5_bed3_c26f5e25a369_Node does not have named vector default configured. Available named vectors map[].

Image

Activity

  1. added
    👻 feat:rag
    on Oct 22, 2025
  2. dosubot commented on Oct 22, 2025

    @dosubot

    This is a known issue when upgrading from Dify 1.9.1 (or earlier) to 1.9.2 with Weaviate as the vector database. The error occurs because older knowledge base collections lack the required named vector configuration (default) that Dify 1.9.2 expects for retrieval operations. The upgrade process does not automatically migrate or patch existing Weaviate collections to add this configuration, so retrieval fails for knowledge created before the upgrade [source].

    To restore retrieval functionality, you need to re-index or re-upload the affected knowledge/documents so that the collections are recreated with the correct named vector configuration. There is currently no automated migration script in the codebase to patch legacy collections; manual re-indexing is required [source].

    If you have a large amount of legacy knowledge, consider scripting the re-upload process or, if possible, exporting and re-importing the data to trigger re-indexing with the new schema.

    To reply, just mention @dosu.


    How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

  3. kurokobo commented on Oct 22, 2025

    @kurokobo
    ContributorAuthor

    @DhruvGorasiya @crazywoola
    Since upgrading Weaviate has been a long-standing issue, this enhancement was highly anticipated, and I’m really grateful for all your hard work.
    On the other hand, I’m concerned that this might cause significant confusion.

    I assume you tested whether “newly created knowledge” works, but did you also test in advance whether “existing knowledge” continues to work?

    I’ve already reviewed the documentation about migrating Weaviate. While there are appealing descriptions such as the following, unfortunately, in practice the Automatic Migration didn’t allow us to use knowledge created before the upgrade.

    Path A: Docker Compose Users (Recommended)
    If you’re using Dify’s standard Docker Compose setup, the Weaviate version is automatically updated when you upgrade Dify. No manual configuration is required.

    Data Migration for Legacy Versions
    Automatic Migration
    In most cases, Weaviate 1.27.0 will automatically migrate data from 1.19.0:

    Therefore, users need to follow the Manual Migration steps, but even then there are issues:

    • The backup-filesystem module isn’t loaded in Weaviate by default, so we can’t create a backup in the first place
    • By default, localhost:8080 isn’t exposed, so the suggested commands in docs don’t work as written. Also, curl is not available in Weaviate container.
    • There’s no mention of the required Authorization header either

    Here’s what I think should be done—what are your thoughts?

    • Implement some automatic migration feature to migrate existing knowledges

    Or,

    • Clearly state that manual data migration for Weaviate is required when upgrading Dify
    • The procedure should be: (EDIT: This might not be entirely accurate. See my follow-up comments.)
      • Add ENABLE_MODULES and BACKUP_FILESYSTEM_PATH configurations to the old version of Weaviate (so that backups are saved to a directory mounted via volumes)
      • Trigger the backup from the worker container (this is straightforward since WEAVIATE_ENDPOINT and WEAVIATE_API_KEY environment variables are available)
      • Upgrade Dify to 1.9.2
      • Add ENABLE_MODULES and BACKUP_FILESYSTEM_PATH configurations to the new version of Weaviate (so you can restore from the mounted backup directory)
      • Trigger the restore from the worker container
  4. self-assigned this
    on Oct 22, 2025
  5. pinned this issue on Oct 22, 2025
  6. kurokobo commented on Oct 22, 2025

    @kurokobo
    ContributorAuthor
    • The procedure should be:
      • Add ENABLE_MODULES and BACKUP_FILESYSTEM_PATH configurations to the old version of Weaviate (so that backups are saved to a directory mounted via volumes)
      • Trigger the backup from the worker container (this is straightforward since WEAVIATE_ENDPOINT and WEAVIATE_API_KEY environment variables are available)
      • Upgrade Dify to 1.9.2
      • Add ENABLE_MODULES and BACKUP_FILESYSTEM_PATH configurations to the new version of Weaviate (so you can restore from the mounted backup directory)
      • Trigger the restore from the worker container

    Since this was just an idea I wrote before thoroughly testing it to follow Manual Migration, I actually tried it out, but the error wasn't resolved after all 🤔

    I'm not a Weaviate expert, so I'm not sure about the details, but it might be related to changes in api/core/rag/datasource/vdb/weaviate/weaviate_vector.py ?

  7. jtfeng commented on Oct 23, 2025

    @jtfeng

    need help,same problem!

  8. Tabll commented on Oct 23, 2025

    @Tabll

    it feels like every upgrade has some issues. last time it was v2.0.0-beta.2 -> v1.9.1 #26091
    fortunately, I checked this issues before upgrading. 😒😒

  9. a397038588-jpg commented on Oct 23, 2025

    @a397038588-jpg

    I think this is a very serious issue. It has caused the already created knowledge base to not function properly, and the documentation doesn't mention how to solve it.

  10. ChiuHsin commented on Oct 23, 2025

    @ChiuHsin

    same problem

  11. HZJprince commented on Oct 23, 2025

    @HZJprince
  12. Gum97 commented on Oct 23, 2025

    @Gum97

    same problem, How to fix ???????

  13. lema-founders commented on Oct 23, 2025

    @lema-founders

    @crazywoola any updates on this?

  14. DhruvGorasiya commented on Oct 23, 2025

    @DhruvGorasiya
    Contributor

    Update: Migration Solution Available

    We've identified the root cause and developed a migration solution.

    The Issue

    Weaviate 1.27.0+ requires a new schema format with named vectors (vectorConfig). Existing data from Weaviate 1.19.0 uses the old format, causing the error when querying with weaviate-client v4.

    The Solution

    We're preparing:

    • Migration script that preserves all embeddings and data
    • Step-by-step guide for Docker and Cloud users
    • Automated detection for multiple knowledge bases

    Timeline

    Migration guide and scripts will be published by the end of the day today to by tomorrow morning latest.

    Temporary Fix

    Downgrade to Dify 1.9.1 if you need immediate access to your knowledge bases:

    git checkout v1.9.1
    cd docker
    docker compose --profile weaviate up -d

    Updates coming soon.

  15. aijuntao commented on Oct 23, 2025

    @aijuntao

    My upgrade from 1.9.1 to 1.9.2 also had this issue. In order to rebuild the index, I changed the Embedding 模型 of the knowledge base. At this time, the knowledge base will automatically rebuild the index, and the problem has been solved. Now the functions can be used normally

    Image
  16. 98 remaining items

  17. dc-vin commented on Dec 4, 2025

    @dc-vin

    Hi @kurokobo

    Sorry for the late follow-up! Our documentation has recently gone through some updates, which unfortunately delayed our ability to update the migration guide in time.

    If you’re open to it, I’d really appreciate any suggestions you might have for improving the content in this PR. Your feedback has been incredibly helpful so far, and it would be great to incorporate your perspective as we refine the guide.

    It would be helpful for us if a reindexing button could be provided on the knowledge base page. Alternatively, a script for full-volume reindexing would also be a good option for users with non-time-sensitive needs. Of course, the best approach would still be to support smooth migration.

  18. kurokobo commented on Dec 4, 2025

    @kurokobo
    ContributorAuthor

    @laipz8200 @RiskeyL
    Thanks for reaching out to me.

    My comments are as stated in this Issue comment. I was considering leaving another comment on the PR, but since it has already been merged, I'll refrain from adding anything further. In the first place, since the PR was created a few days after my comment, I assume it was intentionally made with a different approach, taking my comment into consideration.

    There’s just one point I’d like to mention.
    I think it would be helpful to clearly explain how to obtain migrate_weaviate_collections.py in the guide, since that information doesn't seem to be mentioned anywhere.

    Also, if the latest migrate_weaviate_collections.py is the one shared in this Issue comment by @crazywoola, there are a few bugs that have become apparent—for example, the issue where objects exceeding 10,000 per collection are truncated (please refer to my comment on the Gist). If migrate_weaviate_collections.py is managed in some repository, I can submit a PR to fix these issues.

  19. pinned this issue on Dec 5, 2025
  20. tomy-kyu commented on Dec 7, 2025

    @tomy-kyu

    It seems that simple schema changes aren't sufficient to resolve this issue, and there are significant discrepancies in how UUIDs are handled between REST APIs and gRPC.

    I was personally curious about this and did some trial-and-error testing, but ultimately found that it would require deep-level modifications to properly reconcile the specification differences between REST APIs and gRPC within the Dify program - clearly beyond what could be fixed in an interim patch.

    I've resigned myself to having to rebuild the index and will proceed in that direction. However, I think it's important to note that this breaking change will likely cause significant difficulties for many people.

    I'll document my trial-and-error process in the following Gist, but please be advised that I won't respond to any questions about it here.
    https://gist.github.com/tomy-kyu/ba9331ee193ea5cb05d2dda1d9bb77c8

  21. Gum97 commented on Dec 9, 2025

    @Gum97

    Any update ?

  22. domonless commented on Dec 9, 2025

    @domonless

    Any update ?

  23. kiedeng commented on Dec 9, 2025

    @kiedeng

    @DhruvGorasiya bro,When will the official migration script be released? This is so frustrating...

  24. kurokobo commented on Dec 9, 2025

    @kurokobo
    ContributorAuthor

    Here’s the current situation:

  25. kiedeng commented on Dec 10, 2025

    @kiedeng

    Here’s the current situation:这是当前情况:

    @kurokobo Thanks bro, I will follow your solution to perform the migration test

  26. Modas-Li commented on Dec 10, 2025

    @Modas-Li

    same issue

  27. Raven-Crow-0117 commented on Dec 12, 2025

    @Raven-Crow-0117

    I'd like to work on this issue.
    I've investigated the root cause and have a fix ready.
    Could I be assigned to this?

  28. Modas-Li commented on Dec 12, 2025

    @Modas-Li
  29. unpinned this issue on Dec 12, 2025
  30. laipz8200 commented on Dec 16, 2025

    @laipz8200
    Member

    We have updated the migration guidelines and tools needed in the latest document. Thank you all for your attention to this issue. If you have any questions, please feel free to contact us.

    Thanks again to everyone who offered suggestions.

    langgenius/dify-docs#616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

👻 feat:rag

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions