Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Set search.numberOfShards = 5 to optimize performance and avoid exceeding the 600 shards per Elasticsearch node limit.

  • Set search.perDomainIndex = True in the cluster configuration before creating the Search Feed.

  • Create a new search feed and make it default. Once the search feed is 100% indexed, it will automatically create separate indices for each domain. For example, domain1_index, domain2_index, etc.

  • Store data from multiple domains in a single index with a domain identifier. For example, { "domain": "domain1", "content": "..." }.

  • index_clustername_feedid_domainUUID.

Implementing Per Domain Index (PDI) Without Downtime

  1. Keep the new search feed index at 100% after PDI is enabled: When enabling PDI, a new set of indices is created, each corresponding to a specific domain. The term "new search feed " refers to the means data being indexed with the new search feed targeting particular ES nodes. The new indices need to be fully populated (100%) before switching to them. This means that all documents should be indexed without any gaps or missing data.
    Implementation Steps:

    1. Enable PDI in the system Cluster settings.

    2. Create new indices for each domain dynamically a new search feed based on predefined templates or configurations.

    3. Reindex all existing documents from the oldscratch, non-PDI index to the new domain-specific indiceswill also be available if not deleted.

    4. Monitor the progress of the reindexing process until all indices reflect 100% of the expected documents.

  2. Once completed, set the new search feed as the default: After all domain-specific indices are fully populated, the system should switch to using these indices for search queriesWhen the search feed is 100%, make it as default, now the cluster should be able to list as per PDI. This switch should be seamless to ensure that users experience no disruption.

    • Implementation Steps:

      1. Confirm that reindexing is complete for all domain indicesthe search feed is 100%.

      2. Update the default search configuration to point feed to the new Per Domain IndicesPDI-enabled search feed.

      3. Conduct tests the test to ensure that search results from the new indices are accurate and completeverify that the Per Domain Index is visible in the Elasticsearch nodes.

  3. Clean up the previous index (created without PDI) as needed: The old index, which stored data without per-domain segregation, is now redundant. Cleaning it up can free up resources and reduce storage costs.

    • Implementation Steps:

      1. Verify that the new indices are performing correctly and no issues exist.

      2. Take a final backup of the old index, if necessary, before deletion.

      3. Delete or archive the old index to remove unnecessary data.

...

  1. Set the new search feed as the default after enabling PDI: If downtime is acceptable, the process is simpler. You can immediately switch to the new indices search feed after enabling PDI, even if they aren’t fully populated. Users will experience downtime or incomplete search results until reindexing is complete.
    Implementation Steps:

    1. Enable PDI and create a new domain-specific indicessearch feed.

    2. Immediately update the search configuration to use these new indices.

    3. Reindex documents into the new indices while search may be temporarily affected.

  2. The new index will be temporarily unavailable for listing: During reindexing, the new domain indices may not be fully operational. Users may experience missing or incomplete data in search results.
    Implementation Steps:

    1. Inform users about the planned downtime and potential service disruption.

    2. Monitor the reindexing process to track progress and identify any issues.

  3. Listing will resume after the new search feed reaches 100% completion: Once the reindexing is complete, the search functionality will return to full capacity with complete and accurate listings.
    Implementation Steps:

    1. Monitor reindexing progress and ensure that all expected documents are indexed.

    2. Conduct validation checks to ensure data integrity and accuracy.

    3. Notify users when the service is fully restored.

...

  1. Set search.perDomainIndex = False and delete the associated Search Feed: To disable PDI, switch the configuration setting that enables it (search.perDomainIndex) to False. This setting controls whether the system should use per-domain indices. After disabling, delete all per-domain indices search feeds to consolidate data back into a single index.
    Implementation Steps:

    1. Set the configuration search.perDomainIndex to False in your application or search engine settings.

    2. Delete or archive the Per Domain Indices search feed as they are no longer needed.

  2. All Per Domain Indices will be removed, leaving a single index operational: After disabling PDI, the system will revert to using a single index for all domains. This simplifies data management but loses the benefits of domain-specific indexing.
    Implementation Steps:

  3. Ensure that the single index is configured to handle all domain data.

  4. Reindex documents from the per-domain indices back into the single consolidated index, if necessary

    .

  5. The number of shards will remain unchanged, so there won’t be any issues with single indexing: The shard count configuration is typically set at the cluster level and doesn’t change when switching from PDI to a single index. This ensures that the system’s capacity for handling search queries remains stable.
    Implementation Steps:

    1. Review the shard configuration of your search engine to confirm it is optimal for a single index.

    2. Adjust the shard count if necessary to balance performance and resource usage.

...

  • Increased Complexity: Managing multiple indexes can complicate the architecture of the search engine or database system. It requires more sophisticated algorithms and infrastructure to handle indexing and searching across domains.

  • Resource Intensive: Each index requires storage space and processing power. Maintaining multiple indexes can lead to higher resource consumption, increasing costs for hardware, maintenance, and energy.

  • Data Duplication: Some data may be relevant to multiple domains, leading to potential duplication across different indexes. This can result in inconsistencies and increased storage requirements.

  • Index Synchronization: Keeping indexes up-to-date across multiple domains can be challenging. Changes in the data must be reflected in all relevant indexes, which can introduce delays or errors.

  • Search Performance: While Per Domain Index can improve search performance for specific queries, it may degrade overall performance when a query spans multiple domains. This can result in longer query times as the system needs to aggregate results from various indexes.

  • Scalability Issues: As the number of domains increases, scaling the infrastructure to support numerous indexes can become difficult. Performance may suffer if not properly managed.

  • Complex Querying: Queries to access information from multiple domains can become more complex. Users may have to specify which domain to search within, leading to a less user-friendly experience.

  • Difficulty in Aggregating Insights: Analyzing data trends across multiple domains can be more complicated, as the separation of indexes may obscure holistic insights.

  • Limited Inter-Domain Relationships: Understanding relationships and connections between different domains may be more challenging when they are indexed separately, limiting the ability to perform cross-domain analytics.

  • Potential for Over-Optimization: Focusing too much on optimizing for specific domains may lead to neglecting broader optimization strategies that could enhance overall system performance.

How to Determine PDI is Working

...