[ 
https://issues.apache.org/jira/browse/SOLR-17443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arda resolved SOLR-17443.
-------------------------
    Resolution: Workaround

I encountered an issue where the Solr API returned a success message for 
document migration but didn't actually migrate the documents. To address this, 
I developed a Python script as a workaround for migrating documents between 
collections. This script may help others facing the same issue until a 
permanent solution is found. Feel free to review and contribute to the 
repository if you have any improvements or suggestions.

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/tree/main]

This is not a direct fix for the API issue but can be used as an alternative 
approach to ensure successful migration.

> 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
>          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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to