You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Arda (Jira)" <ji...@apache.org> on 2024/09/06 20:55:00 UTC
[jira] [Commented] (SOLR-17443) While using Solr 7.7.2, I attempted to migrate documents between collections using the Collections API. Despite receiving successful responses, no documents were migrated.
[ https://issues.apache.org/jira/browse/SOLR-17443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17879975#comment-17879975 ]
Arda commented on SOLR-17443:
-----------------------------
I encountered the issue where the migration via API returned a success response but did not actually migrate the documents. To resolve this, I wrote a Python script that directly interacts with the Solr APIs for a more reliable migration process.
Here, you can find the code and detailed instructions in the following GitHub repository:
[GitHub Repository Link|https://github.com/ardatezcan1/solr_migrate_api_solution/blob/main/solr_code.py]
This script should help others who face similar migration issues. Feel free to review and contribute to the repository if you have any improvements or suggestions.
> While using Solr 7.7.2, I attempted to migrate documents between collections using the Collections API. Despite receiving successful responses, no documents were migrated.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-17443
> URL: https://issues.apache.org/jira/browse/SOLR-17443
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: JSON Request API, SolrCloud, v2 API
> Affects Versions: 7.7.2
> Reporter: Arda
> Priority: Minor
> Labels: collection-api
>
> *Issue Summary*
> I am using Solr version 7.7.2 and encountered an issue while attempting to migrate documents from one collection to another using the Collections API. Despite receiving a successful response, the documents are not actually migrated. I followed the official Solr documentation for data migration:
> [https://solr.apache.org/guide/7_7/collections-api.html#migrate]
> Here are the commands I used:
>
> 1- curl -k -g--negotiate -u: "https://‹solr_server_hostname>:<solr_port>/solr/admin/collections?action=migrate&collection=<source_collection_name>&split.key=compositeId&target.collection=<the_collection_which_I_created_new's_name>"
>
> 2- curl -k -g--negotiate -u: "https://<solr-node-hostname:port>/solr/admin/collections?action=MIGRATE&collection=<source_collection>&split.key=!&target.collection=<target_collection>&async=1000"
>
> I tried using a generic split key ("!") as the routing key prefix was unknown. However, in bash, this caused a -bash: !: event not found error. To avoid this, I also attempted using escaped characters like \! and %21. Despite these modifications, all commands returned a successful response but did not actually migrate the documents.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org