Legacy/Re-Indexing the PQM Data

Overview

In this document, we will learn how to legacy index/re-index the pqm index

PQM-Inbox-Reindexing

Pre-Requisuites

  • Kubectl access to the required environment in which you want to run the re-indexing

  • playground pod access

  • Legacy index mapping/configuration done in the respective indexer-config ( in this case for pqm , legacy index conifiguration for pqm is done here)

Postman Collection

Postman collection to re-index the data for PQM can be downloaded here .

Steps to legacy-index PQM

  1. After importing the postman collection downloaded from above section, you can find two request

    1. pqm-services-legacy : This request helps to get the data from pqm/plainsearch api and push data to pqm-services-enriched topic by indexer service

    2. pqm-services-legacy-kafkaconnector : This is the request to create a connector which can listen to the pqm-application topic and push data to the elastic search with the new index pqm-application-enriched

  2. Run the pqm-legacy-kafkaconnector request in the playground pod, which would create a connector which would intern start listening to the topic pqm-application-legacyindex-enriched-sink

  3. Run the pqm-legacy request in the playground pod, which would call indexer service to initiate the process of fetching the data from plainsearch and push the data prepared according to the legacy-index mapping and push the data to the pqm-application-legacyindex-enriched-sink topic

  4. Whole process would take some time, meanwhile you can search for the data in pqm-application-legacyindex-enriched index in the elastic search

  5. we can go through the logs of the indexer pod, which would help to understand the job is done

  6. Once the job is done, delete the kafka connector running the below curl in the playground curl --location --request DELETE 'http://kafka-connect.kafka-cluster:8083/connectors/pqm-application-enriched-es-sink'

  7. Once reindexing is completed, please verify the count in pqm-application index and pqm-application-legacyindex-enriched index, then copy the pqm-application-legacyindex-enriched index to pqm-application and delete pqm-application-legacyindex-enriched index.Please use below command for coping.

POST _reindex
{
  "source": {
    "index": "pqm-application-legacyindex-enriched"
  },
  "dest": {
    "index": "pqm-application"
  }
}

PQM-Service Re-Indexing

Pre-Requisuites

  • Kubectl access to the required environment in which you want to run the re-indexing

  • playground pod access

  • Legacy index mapping/configuration done in the respective indexer-config ( in this case for pqm , legacy index conifiguration for pqm is done here)

Postman Collection

Postman collection to re-index the data for PQM can be downloaded here .

Steps to legacy-index PQM

  1. After importing the postman collection downloaded from above section, you can find two request

    1. pqm-services-legacy : This request helps to get the data from pqm/plainsearch api and push data to pqm-services-enriched topic by indexer service

    2. pqm-services-legacy-kafkaconnector : This is the request to create a connector which can listen to the pqm-application topic and push data to the elastic search with the new index pqm-application-enriched

  2. Run the pqm-services-legacy-kafkaconnector request in the playground pod, which would create a connector which would intern start listening to the topic pqm-service-index-enriched-sink

  3. Run the pqm-services-legacy request in the playground pod, which would call indexer service to initiate the process of fetching the data from plainsearch and push the data prepared according to the legacy-index mapping and push the data to the pqm-service-index-enriched-sink topic

  4. Whole process would take some time, meanwhile you can search for the data in pqm-service-legacyindex-enriched index in the elastic search

  5. we can go through the logs of the indexer pod, which would help to understand the job is done

  6. Once the job is done, delete the kafka connector running the below curl in the playground curl --location --request DELETE 'http://kafka-connect.kafka-cluster:8083/connectors/pqm-service-index-enriched-es-sink0500'

7.Once reindexing is completed, please verify the count in pqm-service index and pqm-service-index-enriched index, then copy the pqm-service-index-enriched index to pqm-service and delete pqm-service-index-enriched index.Please use below command for coping.


POST _reindex
{
  "source": {
    "index": "pqm-service-index-enriched"
  },
  "dest": {
    "index": "pqm-service"
  }
}

Pqm-Anomaly-Reindexing

Pre-requisites

  • Kubectl access to the required environment in which you want to run the re-indexing

  • playground pod access

  • Legacy index mapping/configuration done in the respective indexer-config ( in this case for pqm-Anomaly , legacy index conifiguration for pqm-Anomaly is done here)

Postman Collection

Postman collection to re-index the data for pqm-Anomaly can be downloaded here .

Steps to legacy-index PQM-Anomaly

  1. After importing the postman collection downloaded from above section, you can find two request

    1. pqm-Anomaly-services-legacy : This request helps to get the data from pqm-Anomaly/plainsearch api and push data to pqm-Anomaly-services-enriched topic by indexer service

    2. pqm-anomaly-services-legacy-kafkaconnector : This is the request to create a connector which can listen to the pqm-anomaly-finder topic and push data to the elastic search with the new index pqm-anomaly-finder-enriched

  2. Run the pqm-anomaly-services-legacy-kafkaconnector request in the playground pod, which would create a connector which would intern start listening to the topic pqm-anomaly-finder-enriched-sink

  3. Run the pqm-Anomaly-services-legacy request in the playground pod, which would call indexer service to initiate the process of fetching the data from plainsearch and push the data prepared according to the legacy-index mapping and push the data to the pqm-Anomaly-application-enriched-sink topic

  4. Whole process would take some time, meanwhile you can search for the data in pqm-anomaly-finder-enriched index in the elastic search

  5. we can go through the logs of the indexer pod, which would help to understand the job is done

  6. Once the job is done, delete the kafka connector running the below curl in the playground curl --location --request DELETE 'http://kafka-connect.kafka-cluster:8083/connectors/pqm-Anomaly-services-legacy-enriched-es-sink'

  7. Once reindexing is completed, please verify the count in pqm-anomaly-finder index and pqm-anomaly-finder-enriched index, then copy the pqm-anomaly-finder-enriched index to pqm-anomaly-finder and delete pqm-anomaly-finder-enriched index.Please use below command for coping.

POST _reindex
{
  "source": {
    "index": "pqm-anomaly-finder-enriched"
  },
  "dest": {
    "index": "pqm-anomaly-finder"
  }
}

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.