Elasticsearch Near Zero Downtime Reindex

- MICRO FOCUS LLC

Systems and methods are disclosed for performing a reindex process and include initiating, by a processor, an initial reindex phase, without entering into a reindex downtime period, and performing, by the processor, incremental reindex phases, without entering into the reindex downtime period. Each incremental reindex phase adjusts changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase. The systems and methods further include determining, by the processor, without entering into the reindex downtime period, a maximum incremental reindex phase and entering, by the processor, a reduced reindex downtime period after determining the maximum incremental reindex phase. The reindex downtime period is greater than the reduced reindex downtime period.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
FIELD OF THE DISCLOSURE

Embodiments of the present disclosure relate generally to systems and methods for information retrieval using an index structure to identify data and more particularly, to systems and methods for updating indices without noticeable interruptions to users of the indices.

BACKGROUND

In search and analytics engines designed for handling large volumes of data, the engines need to perform a reindex process (copy all the data from a source index to a new destination index) whenever versions of the engines change or an index schema change. For engine driven changes (e.g., upgrading to a new version of the engine) it is necessary to reindex the data because upgrades may introduce changes to index structure, mappings or other configurations. For index schema changes (e.g., application driven changes), a reindex process is required to modify the mappings or settings that may require moving fields, changing data types or updating index configurations. When updates or deletions occur on the source index during a reindex process, these updates or deletions may lead to serious data consistency issues, causing data inconsistencies between the source index and the destination index. To avoid the data inconsistencies between the source index and the destination index, it is necessary to take the source index offline and enter a downtime period. The downtime period is dependent on the source index size, whereby the larger the source index size, the greater the downtime period. For extremely large source indices, the downtime period may span over several days or even several weeks.

Whether the downtime period is required during the reindex process depends on the database or search engine being used and how the reindex process is implemented. For example, the Elastics each search engine allows for reindexing without downtime in limited situations, but the performance of the search engine is degraded when reindexing is performed in bulk.

BRIEF SUMMARY

Improving the efficiency in the reindex process on a large number of records or documents at once with a reduced downtime period and superior performance of the search engine during the reindex process while still performing updates and/or deletions on the source index during the reindex process is desirable.

Based on this, embodiments of the present disclosure implement a reindex process broken into distinct stages: (1) an initial (or bulk) reindex phase (stage 1); (2) incremental reindex phases (stage 2, stage 3, stage 4, etc.); and (3) a downtime phase (final stage). The initial reindex phase (e.g., stage 1) moves the bulk of existing documents (excluding those marked as deleted) whereby all ongoing changes during stage 1 are continued to be marked with the status value (e.g., p1 for updated and created documents and d1 for deleted documents).

The incremental reindex phases (e.g., stage 2, stage 3, stage 4, etc.) take place after a previous stage has been completed. The incremental reindex phases first increments the reindex phase or stage. For example, after the initial reindex phase (stage 1) has been completed, the process moves to the incremental reindex phase 2 (e.g., stage 2). In the incremental reindex phase 2, documents are no longer marked with d1 for the deleted documents and p1 for the updated or created documents, but instead, documents are marked with d2 for the deleted documents and p2 for the updated or created documents. Also during the incremental reindex phase 2, documents that were updated or created during the execution of stage 1 (e.g., p1 documents) but were not moved to the destination index during stage 1, are subsequently moved to the destination index during stage 2.

According to an embodiment of the present disclosure, for subsequent incremental reindex phases (e.g., stage 2, stage 3, stage 4, etc.), pi−1 (where “i” is a positive integer) documents that were not moved to the destination index during stage i−1 are moved to the destination index during stage i.

Moreover, documents marked with d1 that were not deleted during the initial reindex phase (e.g., stage 1) are deleted from the destination index using the document ID of the deleted document location in the source index during stage 2. According to an embodiment of the present disclosure, for subsequent incremental reindex phases (e.g., stage 2, stage 3, stage 4, etc.), di−1 (where “i” is a positive integer) documents that were moved to the destination index during stage i−1 are deleted from the destination index using the document ID of the document in the source index at stage i. Therefore, each incremental reindex phase (e.g., stage 2, stage 3, stage 4, etc.) captures more changes (e.g. creates/updates and deletes for d2, p2, d3, p3, d4, p4, etc.).

These and other needs are addressed by the various embodiments and configurations of the present invention. The present invention can provide a number of advantages depending on the particular configuration. These and other advantages will be apparent from the disclosure of the invention(s) contained herein.

In some aspects, the techniques described herein relate to a method for performing a reindex process including initiating, by a processor, an initial reindex phase, without entering into a reindex downtime period, performing, by the processor, incremental reindex phases, without entering into the reindex downtime period, wherein each incremental reindex phase adjusts changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase, determining, by the processor, without entering into the reindex downtime period, a maximum incremental reindex phase and entering, by the processor, a reduced reindex downtime period after determining the maximum incremental reindex phase. The reindex downtime period is greater than the reduced reindex downtime period.

In some aspects, the techniques described herein relate to a method, further including creating, by the processor, without entering into the reindex downtime period, a document status field for each document of the plurality of documents in the source index, wherein each document of the plurality of documents includes a unique document identification, and wherein the document status field is assigned one of the following values: no change for no changes to the documents, change for updates or changes to the documents or delete for deleted documents.

In some aspects, the techniques described herein relate to a method, further including filtering out, by the processor, during the initial reindex phase, the documents in the source index with the document status field value of delete by moving the documents with the document status field values of no change and change to the destination index.

In some aspects, the techniques described herein relate to a method, wherein adjusting changes to documents in the source index moved to the destination index includes moving, by the processor, documents from the source index to the destination index with the document status field value of change adjusted during the execution of the initial reindex phase and deleting documents from the destination index using the unique document identification of the documents in the source index that were adjusted during the execution of the initial reindex phase.

In some aspects, the techniques described herein relate to a method, wherein each of the reindex downtime period and the reduced reindex downtime period includes blocking write application access to the source index.

In some aspects, the techniques described herein relate to a method, further including creating, by the processor, without entering into the reindex downtime period, an alias pointing to the source index.

In some aspects, the techniques described herein relate to a method, wherein filtering out, by the processor, during the initial reindex phase, the documents in the source index with the document status field value of delete includes replacing, by the processor, the source alias with an alias without the deleted documents.

In some aspects, the techniques described herein relate to a method, further including changing the source alias of the source index to the destination index.

In some aspects, the techniques described herein relate to a method, further including verifying, by the processor, that a number of documents in the source index without the document status field value of delete is equal to a number of documents in the destination index.

In some aspects, the techniques described herein relate to a system for performing a reindex process including a processor and a memory coupled with and readable by the processor and storing therein a set of instructions which, when executed by the processor, causes the processor to initiate an initial reindex phase, without entering into a reindex downtime period, perform incremental reindex phases, without entering into the reindex downtime period, wherein each incremental reindex phase adjusts changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase, determine without entering into the reindex downtime period, a maximum incremental reindex phase and enter a reduced reindex downtime period after determining the maximum incremental reindex phase. The reindex downtime period is greater than the reduced reindex downtime period.

In some aspects, the techniques described herein relate to a system, wherein the instructions further cause the processor to create without entering into the reindex downtime period, a document status field for each document of the plurality of documents in the source index, wherein each document of the plurality of documents includes a unique document identification, and wherein the document status field is assigned one of the following values: no change for no changes to the documents, change for updates or changes to the documents or delete for deleted documents.

In some aspects, the techniques described herein relate to a system, wherein the instructions further cause the processor to filter out during the initial reindex phase, the documents in the source index with the document status field value of delete by moving the documents with the document status field values of no change and change to the destination index.

In some aspects, the techniques described herein relate to a system, wherein adjust changes to documents in the source index moved to the destination index further cause the processor to move documents from the source index to the destination index with the document status field value of change adjusted during the execution of the initial reindex phase and deleting documents from the destination index using the unique document identification of the documents in the source index that were adjusted during the execution of the initial reindex phase.

In some aspects, the techniques described herein relate to a system, wherein each of the reindex downtime period and the reduced reindex downtime period includes blocking write application access to the source index.

In some aspects, the techniques described herein relate to a system, wherein the instructions further cause the processor to create without entering into the reindex downtime period, an alias pointing to the source index.

In some aspects, the techniques described herein relate to a system, wherein filter out during the initial reindex phase, the documents in the source index with the document status field value of delete includes replace the source alias with an alias without the deleted documents.

In some aspects, the techniques described herein relate to a system, wherein the instructions further cause the processor to change the source alias of the source index to the destination index.

In some aspects, the techniques described herein relate to a system, wherein the instructions further cause the processor to verify that a number of documents in the source index without the document status field value of delete is equal to a number of documents in the destination index.

In some aspects, the techniques described herein relate to a non-transitory computer readable medium having stored thereon instructions that cause a processor to execute a method for performing a reindex process, the method comprising instructions to initiate an initial reindex phase, without entering into a reindex downtime period, perform incremental reindex phases, without entering into the reindex downtime period, wherein each incremental reindex phase adjusts changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase, determine without entering into the reindex downtime period, a maximum incremental reindex phase and enter a reduced reindex downtime period after determining the maximum incremental reindex phase. The reindex downtime period is greater than the reduced reindex downtime period.

In some aspect, the techniques described herein relate to a non-transitory computer readable medium, wherein the instructions further cause the processor to create without entering into the reindex downtime period, a document status field for each document of the plurality of documents in the source index, wherein each document of the plurality of documents includes a unique document identification, and wherein the document status field is assigned one of the following values: no change for no changes to the documents, change for updates or changes to the documents or delete for deleted documents.

Any aspect in combination with any one or more other aspects.

Any one or more of the features disclosed herein.

Any one or more of the features as substantially disclosed herein.

Any one or more of the features as substantially disclosed herein in combination with any one or more other features as substantially disclosed herein.

Any one of the aspects/features/embodiments in combination with any one or more other aspects/features/embodiments.

Use of any one or more of the aspects or features as disclosed herein.

Any of the above aspects or aspects of the embodiments described herein, wherein the data storage comprises a non-transitory storage device, which may further comprise at least one of: an on-chip memory within the processor, a register of the processor, an on-board memory co-located on a processing board with the processor, a memory accessible to the processor via a bus, a magnetic media, an optical media, a solid-state media, an input-output buffer, a memory of an input-output component in communication with the processor, a network communication buffer, and a networked component in communication with the processor via a network interface.

It is to be appreciated that any feature described herein can be claimed in combination with any other feature(s) as described herein, regardless of whether the features come from the same described embodiment.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating elements of an exemplary computing environment in which embodiments of the present disclosure may be implemented.

FIG. 2 is a block diagram illustrating elements of an exemplary computing device in which embodiments of the present disclosure may be implemented.

FIG. 3 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIG. 4 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIG. 5 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIG. 6 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIG. 7 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIG. 8 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIG. 9 is a block diagram illustrating an exemplary architecture for performing a reindex process according to one embodiment of the present disclosure.

FIGS. 10A-10C are diagrams illustrating a flowchart of an example method for performing a reindex process according to an embodiment of the present disclosure.

In the appended figures, similar components and/or features may have the same reference label. Further, various components of the same type may be distinguished by following the reference label by a letter that distinguishes among the similar components. If only the first reference label is used in the specification, the description is applicable to any one of the similar components having the same first reference label irrespective of the second reference label.

DETAILED DESCRIPTION

The following detailed description refers to the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the following description to refer to the same or similar parts. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only. While several examples are described in this document, modifications, adaptations, and other implementations are possible. Accordingly, the following detailed description does not limit the disclosed examples. Instead, the proper scope of the disclosed examples may be defined by the appended claims.

The detailed description provides embodiments only and is not intended to limit the scope, applicability, or configuration of the claims. Rather, the detailed description will provide those skilled in the art with an enabling description for implementing the embodiments. It will be understood that various changes may be made in the function and arrangement of elements without departing from the spirit and scope of the appended claims.

Any reference in the description comprising a numeric reference number, without an alphabetic sub-reference identifier when a sub-reference identifier exists in the figures, when used in the plural, is a reference to any two or more elements with the like reference number. When such a reference is made in the singular form, but without identification of the sub-reference identifier, it is a reference to one of the like numbered elements, but without limitation as to the particular one of the elements being referenced. Any explicit usage herein to the contrary or providing further qualification or identification shall take precedence.

The exemplary systems and methods of this disclosure will also be described in relation to analysis software, modules, databases, search engines, and associated analysis hardware, database hardware, search engine hardware, etc. However, to avoid unnecessarily obscuring the present disclosure, the following description omits well-known structures, components, and devices, which may be omitted from or shown in a simplified form in the figures or otherwise summarized.

For purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the present disclosure. It should be appreciated, however, that the present disclosure may be practiced in a variety of ways beyond the specific details set forth herein.

With due attention to the items provided herein, including technical processes, technical effects, technical mechanisms, and technical details which are illustrative but not comprehensive of all claimed or claimable embodiments, one of skill will understand that the present disclosure and the embodiments described herein are not directed to subject matter outside the technical arts, or to any idea of itself such as a principal or original cause or motive, or to a mere result per se, or to a mental process or mental steps, or to a business method or prevalent economic practice, or to a mere method of organizing human activities, or to a law of nature per se, or to a naturally occurring thing or process, or to a living thing or part of a living thing, or to a mathematical formula per se, or to isolated software per se, or to a merely conventional computer, or to anything wholly imperceptible or any abstract idea per se, or to insignificant post-solution activities, or to any method implemented entirely on an unspecified apparatus, or to any method that fails to produce results that are useful and concrete, or to any preemption of all fields of usage, or to any other subject matter which is ineligible for patent protection under the laws of the jurisdiction in which such protection is sought or is being licensed or enforced.

The phrases “at least one,” “one or more,” “or,” and “and/or” are open-ended expressions that are both conjunctive and disjunctive in operation. For example, each of the expressions “at least one of A, B, and C,” “at least one of A, B, or C,” “one or more of A, B, and C,” “one or more of A, B, or C,” “A, B, and/or C,” and “A, B, or C” means A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together.

The term “a” or “an” entity refers to one or more of that entity. As such, the terms “a” (or “an”), “one or more” and “at least one” can be used interchangeably herein. It is also to be noted that the terms “comprising,” “including,” and “having” can be used interchangeably.

The term “automatic” and variations thereof, as used herein, refers to any process or operation, which is typically continuous or semi-continuous, done without material human input when the process or operation is performed. However, a process or operation can be automatic, even though performance of the process or operation uses material or immaterial human input, if the input is received before performance of the process or operation. Human input is deemed to be material if such input influences how the process or operation will be performed. Human input that consents to the performance of the process or operation is not deemed to be “material.”

Aspects of the present disclosure may take the form of an embodiment that is entirely hardware, an embodiment that is partially software (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module,” or “system.” Any combination of one or more computer-readable medium(s) may be utilized. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.

A computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer-readable storage medium may be any tangible, non-transitory medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

A computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

The terms “determine,” “calculate,” “compute,” and variations thereof, as used herein, are used interchangeably and include any type of methodology, process, mathematical operation or technique.

The term “means” as used herein shall be given its broadest possible interpretation in accordance with 35 U.S.C., Section 112(f) and/or Section 112, Paragraph 6. Accordingly, a claim incorporating the term “means” shall cover all structures, materials, or acts set forth herein, and all of the equivalents thereof. Further, the structures, materials or acts and the equivalents thereof shall include all those described in the summary, brief description of the drawings, detailed description, abstract, and claims themselves. The preceding is a simplified summary of the invention to provide an understanding of some aspects of the invention. This summary is neither an extensive nor exhaustive overview of the invention and its various embodiments. It is intended neither to identify key or critical elements of the invention nor to delineate the scope of the invention but to present selected concepts of the invention in a simplified form as an introduction to the more detailed description presented below. As will be appreciated, other embodiments of the invention are possible utilizing, alone or in combination, one or more of the features set forth above or described in detail below. Also, while the disclosure is presented in terms of exemplary embodiments, it should be appreciated that an individual aspect of the disclosure can be separately claimed.

Embodiments relate to systems and methods for performing a reindex process with a reduced downtime while still performing updates and/or deletions on the source index during the reindex process. According to embodiments of the present disclosure, two indices are usually created: a source index (from which data is being read) and a destination index (where the data will be written to). The reindex process is useful when updating the mappings, adjusting index settings, or migrating data between different environments are required. After the reindex process has been completed (e.g., copying the data from the source index to the destination index), verification that the data has been correctly copied into the destination index is made by performing a search on the destination index. This may involve running queries and checking that the mappings and the settings are correct. Once the new index is validated, the application can be switched over to use the new index by updating search queries, routings and index aliases. Moreover, after confirming that everything is working properly with the new index, the old index may be deleted to save storage space or archived to retain the old index for historical purposes.

At least one drawback to performing the reindex process is the downtime involved in performing the operation. Because of the downtime, reindex processes are typically background operations so that the downtime is minimized. But depending on the size of the dataset, this may take time. As such, reindex processes are performed during off-peak hours or reindex processes use index aliases to avoid downtime. Aliases allow the index names to be abstracted in the application, so that switching between the old and new indices can be performed seamlessly. With an alias, the new index is pointed to after the reindex process has been completed without the need to update all queries. Embodiments of the present disclosure provide the ability to perform a reindex process for large amounts of data without experiencing significant downtime.

In many cases, reindexing involves a large number of documents covering different aspects or features of the application. Reindexing a large number of documents is a technical activity which cannot be performed mentally, or entirely by pen and paper. As indicated in the examples above and will be evident in the present disclosure, various aspects of the present disclosure provide a unique computing solution to a unique computing problem that did not exist prior to performing a reindex process for large amounts of data without experiencing significant downtime. Implementations of the subject matter disclosed herein provide meaningful improvements for updating, deleting, retrieving, and creating data during a reindex process by a computer system with reduced downtime, thus improving computer functionality and operation. As such, implementations of the subject matter disclosed herein are not an abstract idea such as organizing human activity or a mental process that can be performed in the human mind, much less using pen and paper.

By performing a reindex process inefficiently with a reduction in downtime results in a much more efficient computing system using the same hardware. The described embodiments of the present disclosure make the existing hardware more efficient while reducing the overall cost of performing a reindex process which was previously impossible. Being able to perform a reindex process with a reduction in downtime is clearly something that cannot be done practically using a mental process. Instead, performing a reindex process with a reduction in downtime described herein will only work practically in a computerized environment. For example, being able to support a higher number of document searches at a lower cost because of the reduction in downtime involves managing terra bytes of information from a very large number of devices to identify issues from a very large number of users in real-time (e.g., thousands of users). Being able to support a higher number of document searches based on the reindex process more efficiently and at a lower cost would simply take too long if performed using a pen and paper.

While the exemplary aspects, embodiments, and/or configurations illustrated herein show the various components of the system collocated, certain components of the system can be located remotely, at distant portions of a distributed network, such as a Local-Area Network (LAN) and/or Wide-Area Network (WAN) such as the Internet, or within a dedicated system. Thus, it should be appreciated that the components of the system can be combined into one or more devices or collocated on a particular node of a distributed network, such as an analog and/or digital telecommunications network, a packet-switch network, or a circuit-switched network. It will be appreciated from the following description, and for reasons of computational efficiency, that the components of the system can be arranged at any location within a distributed network of components without affecting the operation of the system.

Furthermore, it should be appreciated that the various links connecting the elements can be wired or wireless links, or any combination thereof, or any other known or later developed element(s) that is capable of supplying and/or communicating data to and from the connected elements. These wired or wireless links can also be secure links and may be capable of communicating encrypted information. Transmission media used as links, for example, can be any suitable carrier for electrical signals, including coaxial cables, copper wire and fiber optics, and may take the form of acoustic or light waves, such as those generated during radio-wave and infra-red data communications.

In yet another embodiment, the systems and methods of this disclosure can be implemented in conjunction with a special purpose computer, a programmed microprocessor or microcontroller and peripheral integrated circuit element(s), an ASIC or other integrated circuit, a digital signal processor, a hard-wired electronic or logic circuit such as discrete element circuit, a programmable logic device or gate array such as Programmable Logic Device (PLD), Programmable Logic Array (PLA), Field Programmable Gate Array (FPGA), Programmable Array Logic (PAL), special purpose computer, any comparable means, or the like. In general, any device(s) or means capable of implementing the methodology illustrated herein can be used to implement the various aspects of this disclosure. Exemplary hardware that can be used for the disclosed embodiments, configurations, and aspects includes computers, handheld devices, telephones (e.g., cellular, Internet enabled, digital, analog, hybrids, and others), and other hardware known in the art. Some of these devices include processors (e.g., a single or multiple microprocessors), memory, nonvolatile storage, input devices, and output devices. Furthermore, alternative software implementations including, but not limited to, distributed processing or component/object distributed processing, parallel processing, or virtual machine processing can also be constructed to implement the methods described herein.

Although the present disclosure describes components and functions implemented in the aspects, embodiments, and/or configurations with reference to particular standards and protocols, the aspects, embodiments, and/or configurations are not limited to such standards and protocols. Other similar standards and protocols not mentioned herein are in existence and are considered to be included in the present disclosure. Moreover, the standards and protocols mentioned herein and other similar standards and protocols not mentioned herein are periodically superseded by faster or more effective equivalents having essentially the same functions. Such replacement standards and protocols having the same functions are considered equivalents included in the present disclosure.

Various additional details of embodiments of the present disclosure will be described below with reference to the figures. While the flowcharts will be discussed and illustrated in relation to a particular sequence of events, it should be appreciated that changes, additions, and omissions to this sequence can occur without materially affecting the operation of the disclosed embodiments, configurations, and aspects.

FIG. 1 is a block diagram illustrating elements of an exemplary computing environment in which embodiments of the present disclosure may be implemented. More specifically, this example illustrates a computing environment 100 that may function as the servers, user computers, or other systems provided and described herein. The environment 100 includes one or more user computers, or computing devices, such as a computing device 104, a communication device 108, and/or more 112. The computing devices 104, 108, 112 may include general purpose personal computers (including, merely by way of example, personal computers, and/or laptop computers running various versions of Microsoft Corp.'s Windows® and/or Apple Corp.'s Macintosh® operating systems) and/or workstation computers running any of a variety of commercially-available UNIX® or UNIX-like operating systems. These computing devices 104, 108, 112 may also have any of a variety of applications, including for example, database client and/or server applications, and web browser applications. Alternatively, the computing devices 104, 108, 112 may be any other electronic device, such as a thin-client computer, Internet-enabled mobile telephone, and/or personal digital assistant, capable of communicating via a network 110 and/or displaying and navigating web pages or other types of electronic documents. Although the exemplary computer environment 100 is shown with two computing devices, any number of user computers or computing devices may be supported.

Environment 100 further includes a network 110. The network 110 may can be any type of network familiar to those skilled in the art that can support data communications using any of a variety of commercially-available protocols, including without limitation Session Initiation Protocol (SIP), Transmission Control Protocol/Internet Protocol (TCP/IP), Systems Network Architecture (SNA), Internetwork Packet Exchange (IPX), AppleTalk, and the like. Merely by way of example, the network 110 maybe a Local Area Network (LAN), such as an Ethernet network, a Token-Ring network and/or the like; a wide-area network; a virtual network, including without limitation a Virtual Private Network (VPN); the Internet; an intranet; an extranet; a Public Switched Telephone Network (PSTN); an infra-red network; a wireless network (e.g., a network operating under any of the IEEE 802.9 suite of protocols, the Bluetooth® protocol known in the art, and/or any other wireless protocol); and/or any combination of these and/or other networks.

The system may also include one or more servers 114, 116. In this example, server 114 is shown as a web server and server 116 is shown as an application server. The web server 114, which may be used to process requests for web pages or other electronic documents from computing devices 104, 108, 112. The web server 114 can be running an operating system including any of those discussed above, as well as any commercially-available server operating systems. The web server 114 can also run a variety of server applications, including SIP servers, HyperText Transfer Protocol (secure) (HTTP(s)) servers, FTP servers, CGI servers, database servers, Java servers, and the like. In some instances, the web server 114 may publish operations available operations as one or more web services.

The environment 100 may also include one or more file and or/application servers 116, which can, in addition to an operating system, include one or more applications accessible by a client running on one or more of the computing devices 104, 108, 112. The server(s) 116 and/or 114 may be one or more general purpose computers capable of executing programs or scripts in response to the computing devices 104, 108, 112. As one example, the server 116, 114 may execute one or more web applications. The web application may be implemented as one or more scripts or programs written in any programming language, such as Java®, C, C#®, or C++, and/or any scripting language, such as Perl®, Python®, or Tool Command Language (TCL), as well as combinations of any programming/scripting languages. The application server(s) 116 may also include database servers, including without limitation those commercially available from Oracle®, Microsoft®, Sybase®, IBM® and the like, which can process requests from database clients running on a computing device 104, 108, 112.

The web pages created by the server 114 and/or 116 may be forwarded to a computing device 104, 108, 112 via a web (file) server 114, 116. Similarly, the web server 114 may be able to receive web page requests, web services invocations, and/or input data from a computing device 104, 108, 112 (e.g., a user computer, etc.) and can forward the web page requests and/or input data to the web (application) server 116. In further embodiments, the server 116 may function as a file server. Although for ease of description, FIG. 1 illustrates a separate web server 114 and file/application server 116, those skilled in the art will recognize that the functions described with respect to servers 114, 116 may be performed by a single server and/or a plurality of specialized servers, depending on implementation-specific needs and parameters. The computer systems 104, 108, 112, web (file) server 114 and/or web (application) server 116 may function as the system, devices, or components described herein.

The environment 100 may also include a database 118. The database 118 may reside in a variety of locations. By way of example, database 118 may reside on a storage medium local to (and/or resident in) one or more of the computers 104, 108, 112, 114, 116. Alternatively, it may be remote from any or all of the computers 104, 108, 112, 114, 116, and in communication (e.g., via the network 110) with one or more of these. The database 118 may reside in a Storage-Area Network (SAN) familiar to those skilled in the art. Similarly, any necessary files for performing the functions attributed to the computers 104, 108, 112, 114, 116 may be stored locally on the respective computer and/or remotely, as appropriate. The database 118 may be a relational database, such as Oracle 20i®, that is adapted to store, update, and retrieve data in response to Structured Query Language (SQL) formatted commands.

FIG. 2 is a block diagram illustrating elements of an exemplary computing device in which embodiments of the present disclosure may be implemented. More specifically, this example illustrates one embodiment of a computer system 200 upon which the servers, user computers, computing devices, or other systems or components described above may be deployed or executed. The computer system 200 is shown comprising hardware elements that may be electrically coupled via a bus 204. The hardware elements may include one or more Central Processing Units (CPUs) or processor 208; one or more input devices 212 (e.g., a mouse, a keyboard, etc.); and one or more output devices 216 (e.g., a display device, a printer, etc.). The computer system 200 may also include one or more storage devices 220. By way of example, storage device(s) 220 may be disk drives, optical storage devices, solid-state storage devices such as a Random-Access Memory (RAM) and/or a Read-Only Memory (ROM), which can be programmable, flash-updateable and/or the like.

The computer system 200 may additionally include a computer-readable storage media reader 224; a communications system 228 (e.g., a modem, a network card (wireless or wired), an infra-red communication device, etc.); and working memory 236, which may include RAM and ROM devices as described above. The computer system 200 may also include a processing acceleration unit 232, which can include a Digital Signal Processor (DSP), a special-purpose processor, and/or the like.

The computer-readable storage media reader 224 can further be connected to a computer-readable storage medium, together (and, optionally, in combination with storage device(s) 220) comprehensively representing remote, local, fixed, and/or removable storage devices plus storage media for temporarily and/or more permanently containing computer-readable information. The communications system 228 may permit data to be exchanged with a network and/or any other computer described above with respect to the computer environments described herein. Moreover, as disclosed herein, the term “storage medium” may represent one or more devices for storing data, including ROM, RAM, magnetic RAM, core memory, magnetic disk storage mediums, optical storage mediums, flash memory devices and/or other machine-readable mediums for storing information.

The computer system 200 may also comprise software elements, shown as being currently located within a working memory 236, including an operating system 240 and/or other code 244. The other code 244 may include a reindex application for example. The reindex application is used to reindex document provided in storage such as storage device(s) 220. It should be appreciated that alternate embodiments of a computer system 200 may have numerous variations from that described above. For example, customized hardware might also be used and/or particular elements might be implemented in hardware, software (including portable software, such as applets), or both. Further, connection to other computing devices such as network input/output devices may be employed.

Examples of the processors 208 as described herein may include, but are not limited to, at least one of Qualcomm® Snapdragon® 800 and 801, Qualcomm® Snapdragon® 620 and 615 with 4G LTE Integration and 64-bit computing, Apple® A7 processor with 64-bit architecture, Apple® M7 motion coprocessors, Samsung® Exynos® series, the Intel® Core™ family of processors, the Intel® Xeon® family of processors, the Intel® Atom™ family of processors, the Intel Itanium® family of processors, Intel® Core® 15-4670K and i7-4770K 22 nm Haswell, Intel® Core® i5-3570K 22 nm Ivy Bridge, the AMD® FX™ family of processors, AMD® FX-4300, FX-6300, and FX-8350 32 nm Vishera, AMD® Kaveri processors, Texas Instruments® Jacinto C6000™ automotive infotainment processors, Texas Instruments® OMAP™ automotive-grade mobile processors, ARM® Cortex™-M processors, ARM® Cortex-A and ARM926EJ-S™ processors, other industry-equivalent processors, and may perform computational functions using any known or future-developed standard, instruction set, libraries, and/or architecture.

FIG. 3 is a block diagram illustrating an exemplary architecture 300 for performing a reindex process according to one embodiment of the present disclosure. As used herein, the term “reindex process” refers to the entire operation (e.g., a complete and end-to-end operation) that migrates documents from the source index to a destination index while ensuring near-zero downtime. The reindex process according to embodiments of the present disclosure is broken into distinct stages: (1) an initial (or bulk) reindex phase (stage 1); (2) incremental reindex phases (stage 2, stage 3, stage 4, etc.); and (3) a downtime phase (final stage). The initial reindex phase (e.g., stage 1) moves the bulk of existing documents (excluding those marked as deleted) whereby all ongoing changes during stage 1 are continued to be marked with the status value (e.g., p1 for updated and created documents and d1 for deleted documents).

The incremental reindex phases (e.g., stage 2, stage 3, stage 4, etc.) take place after a previous stage has been completed. The incremental reindex phases first increments the reindex phase or stage. For example, after the initial reindex phase (stage 1) has been completed, the process moves to incremental reindex phase 2 (e.g., stage 2). In incremental reindex phase 2, the documents are no longer marked with d1 for deleted documents and p1 for updated or created documents, but instead, documents are marked with d2 for deleted documents and p2 for updated or created documents. Also during the incremental reindex phase 2, documents that were updated or created during the execution of stage 1 (e.g., p1 documents) but were not moved to the destination index during stage 1, are subsequently moved to the destination index during stage 2.

According to an embodiment of the present disclosure, for subsequent incremental reindex phases (e.g., stage 2, stage 3, stage 4, etc.), pi−1 (where “i” is a positive integer) documents that were not moved to the destination index during stage i−1 are moved to the destination index during stage i.

Moreover, documents marked with d1 that were not deleted during the initial reindex phase (e.g., stage 1) are deleted from the destination index using the document ID of the deleted document location in the source index during stage 2. According to an embodiment of the present disclosure, for the subsequent incremental reindex phases (e.g., stage 2, stage 3, stage 4, etc.), di−1 (where “i” is a positive integer) documents that were moved to the destination index during stage i−1 are deleted from the destination index using the document ID of the document in the source index at stage i. Therefore, each incremental reindex phase (e.g., stage 2, stage 3, stage 4, etc.) captures more changes (e.g. creates/updates and deletes for d2, p2, d3, p3, d4, p4, etc.).

Each incremental reindex phase catches up on the changes made during the previous incremental reindex phase until either an incremental reindex phase finishes in less than a predetermined threshold time or a maximum number of incremental reindex phases has been reached. According to embodiments of the present disclosure, the maximum number of incremental reindex phases (e.g., MAX_ITERATIONS) is defined using the following variables. N: Total number of documents in the source index; R: Incremental reindex phase rate (e.g., the documents reindexed during the incremental reindex phase per second); U: Update/delete rate (e.g., the document changes per second during the incremental reindex phase); and T: Acceptable downtime threshold (in seconds), which was set as MAX_THRESHOLD_IN_SECONDS.

As stated above, the initial reindex phase is defined as the full reindex of all documents which takes approximately N/R seconds. During this time, roughly (N/R)× U documents are updated or deleted. The incremental reindex phases are defined as catching up on the changes made during the previous incremental reindex phase. The duration of each subsequent incremental reindex phase decreases roughly by a factor of (U/R).

In the downtime phase an acceptable downtime is defined in T seconds (e.g., MAX_THRESHOLD_IN_SECONDS=T). The downtime phase is executed during a brief downtime, that must be completed within this threshold. The estimated duration of the final incremental reindex phase is approximately: T_final≈(N/R)*(U/R)m, where m is the number of incremental reindex phases before entering the downtime phase.

T final ≈ N R × ( U R ) m

To determine MAX_ITERATIONS the number of incremental reindex phases (denoted as m) is chosen so that the final phase satisfies: (N/R)*(U/R)m≤T

N R × ( U R ) m ≤ T

Rearranging the inequality gives: m≥ln(N/(T*R))/ln(R/U)

m ≥ ln ⁢ ( N T · R ) ln ⁢ ( R U )

This yields that MAX_ITERATIONS=ceil(ln(N/(T*R))/ln(R/U))

MAX_ITERATIONS = ⌈ ln ⁢ ( N T · R ) ln ⁢ ( R U ) ⌉

This ensures that the final incremental reindex phase remains within the downtime threshold. This approach provides for dynamically determining the number of incremental reindex phases needed so that when switching to the downtime phase, the reindex process finishes in less than or equal to T seconds.

According to one example embodiment of the present disclosure, the following values are provided for N: Total number of documents in the source index; R: Incremental reindex phase rate (e.g., the documents reindexed during the incremental reindex phase per second); U: Update/delete rate (e.g., the document changes per second during the incremental reindex phase); and T: Acceptable downtime threshold (in seconds), which was set as MAX_THRESHOLD_IN_SECONDS.

N=100,000,000 documents; R=5,000 documents/second; U=1,000 documents/second; and T=30 seconds. Therefore, the final phase T_final is calculated as follows:

T final ≈ N R × ( U R ) m = 20 ⁢ 000 × ( 0.2 ) m

For a value of T to be less than 30 seconds, the following equation is calculated.


20000×(0.2)m≤30⇒(0.2)m≤0.0015

When solving the equation, the value of m is calculated as follows.

m ≥ ln ⁢ ( 0.0015 ) ln ⁢ ( 0.2 ) ≈ - 6.502 - 1.609 ≈ 4.04 ⟹ m = ( ceiling )

Therefore, according to the example embodiment of the present disclosure for the values of N, R, U and T, 5 incremental reindex phases are required to ensure that the final downtime phase is within 30 seconds.

For a traditional reindex process given the same values of N and R (since all write and block operations are suspended during the downtime for the traditional reindex process, the value for U becomes irrelevant) the downtime is significantly greater as indicated below with a freeze time (e.g., downtime) calculated as N/R.

T freeze = N R = 1000 ⁢ 000 ⁢ 000 5 ⁢ 000 = 20 ⁢ 000 ⁢ s ≈ 5 ⁢ h ⁢ 34 ⁢ m

The downtime is cut by approximately 99.85% given that the downtime for embodiments of the present disclosure is approximately 30 seconds and the downtime for the traditional reindex process is approximately 5 hours and 34 minutes.

The downtime phase (e.g., stage 3), whereby an incremental reindex phase (e.g. reindex phase 2, reindex phase 3, etc.) completes in less than the maximum threshold time, is performed during a brief downtime window to capture any remaining changes to the documents and ensures that the destination index is fully synchronized. Thus, in the downtime phase, all documents are deleted, by the document ID, corresponding to previous deletion markers (e.g., d (i−1)) from the destination index, ensuring that the destination index is fully synchronized with the source index including the last p and d changes. These stages will be discussed in greater detail below.

As discussed herein, Elasticsearch® is used as the search and analytics engine for reindex of data. Elasticsearch® is a highly scalable and powerful open-source search and analytics engine designed for handling large volumes of data in real-time. Elasticsearch® is widely used for search functionality in applications, but it's also highly effective for logging, monitoring, and analyzing large datasets. Elasticsearch® is based on Apache Lucene and is part of the Elastic Stack, which also includes Logstash (data processing pipeline) and Kibana (data visualization platform). Although Elasticsearch® is discussed in the following example embodiments of the present disclosure, other search and analytics engines such as Apache Solr, Apache Lucene, Amazon OpenSearch, Algolia, MeiliSearch, Sphinx Search, Typesense, Xapian, Azure Cognitive Search or Amazon CloudSearch (cloud-based search services), Splunk (widely used for log analytics) and IBM Watson Discovery (for enterprise search and cognitive analytics) can be used without departing from the spirit and scope of the present disclosure.

As illustrated in this example, the architecture 300 can include an application 304, a source index 308 and a destination index 312. Examples of the application 304 may include but are not limited to, databases, search engines, log management and analysis applications, data analytic and business intelligence applications, recommendation systems applications, geospatical applications, real-time data streaming an event processing applications, enterprise search solutions applications, text mining and natural language processing (NLP) applications, machine learning and artificial intelligence applications, content-based applications, content management systems (CMS), e-commerce platforms, social media or collaboration platforms, fraud detection and security analytics systems, Internet of Things (IoT) data platforms, monitoring and alerting systems and/or any application(s) that rely on indexed data for search or analytics—and requires near-zero downtime during data migration. The source index 308 and the destination index 312 may be stored in a database such as database 118 illustrated in FIG. 1. The source index 308 contains a collection of documents that share similar characteristics. In Elasticsearch®, a document is the basic unit of information that can be indexed and stored. A document is a JSON (or sometimes XML) object that contains a set of key-value pairs. Each document is a single entry or record in Elasticsearch®, and it's similar to a row in a relational database. According to embodiments of the present disclosure, each document has its own unique document identification (ID). Therefore, when documents are deleted and new documents are created, the newly created documents will have unique document IDs, different from each other, different from document IDs of existing documents and different from document IDs of deleted documents. Here's an example of a document in JSON format representing a product:

json Copy {  “product_id”: “12345”,  “product_name”: “Wireless Headphones”,  “brand”: “BrandX”,  “price”: 99.99,  “category”: “Electronics”,  “release_date”: “2024-01-15” }

As illustrated in FIG. 3, each document contained in the source index 308 includes a field and a value for the field. The source index 308, and likewise the destination index 312 is like a database in relational database management systems. It is a collection of documents that share the same data structure, such as the same fields and field types. A field in Elasticsearch® refers to an individual piece of data within a document. Fields are the key-value pairs within a document that represent different attributes of the data and include a field name (e.g., the key in the key-value pair); a field value (e.g., the value that corresponds to that key which can be a string, a number, a data, etc.); and field types (e.g., fields have different data types and the type defines how Elasticsearch® should treat the field during indexing and querying. Examples of field types include text, keyword, integer, date, boolean, etc.

In the previous document example, the fields are:

    • product_id
    • product_name
    • brand
    • price
    • category
    • release date
      Each of these fields holds specific data for that product. To index documents, the Index application programming interface (API) can be used, whereby the document ID can be specified or Elasticsearch® can generate one.

Index a Document:

json Copy POST /products/_doc/1 {  “product_id”: “12345”,  “product_name”: “Wireless Headphones”,  “brand”: “BrandX”,  “price”: 99.99,  “category”: “Electronics”,  “release_date”: “2024-01-15” }
    • In this case, the document with ID 1 will be indexed under the products index.

As illustrated in FIG. 3, the source index 308 includes documents having unique document IDs, with each document including at least the following fields: Field 1 and Field 2. According to one embodiment of the present disclosure, an alias, “source_alias” 330 is provided. As discussed above, an alias is a virtual name that points to one or more indices. It is a powerful feature that provides flexibility in managing and interacting with indices without having to refer to the indices directly by name. Aliases act as a layer of abstraction between the application and the underlying indices, allowing for easier management of indices, more flexible search operations, and smoother upgrades or changes. Moreover, an alias acts as a pointer, which means that operations such as search, indexing, and updates are performed on the alias rather than the actual index. According to embodiments of the present disclosure, “source_alias” 330 acts as a layer of abstraction between the application 304 and the source index 308, whereby the operations are performed on “source_alias” 330 instead of source index 308.

After the “source_alias” 330 is provided to point to the source index 308, an additional field “doc_status” is added to each document in the source index 308. According to an alternative embodiment of the present disclosure, the additional field “doc_status” is added to each document in the source index 308 prior to the “sourc_alias” 330 being provided. As discussed in greater detail below, the field “doc_status” can have the following values: a “null” value (no change to the document), a “p” value (create or update document) or a “d” value (delete document). Prior to the start of the reindex process the documents are marked with p, d or null. This means that every document in the source index 308 is updated to include the new “doc_status” field with one of the values p1, d1, or null.

FIG. 4 is a block diagram illustrating an exemplary architecture 400 for performing a reindex process according to one embodiment of the present disclosure. As illustrated in FIG. 4, the initial (or bulk) reindex phase (stage 1) has been initiated and if the application 304 receives a delete operation for one of the documents after the initial (or bulk) reindex process (stage 1) has begun, instead of immediately deleting the document from the source index 308, the search and analytics engine (e.g., processor or CPU 208) which manages the source index 308, instead updates the document's “doc_status” field to indicate deletions (e.g., sets it to d1, and later to d2, etc.) in the source index 308. Moreover, if during the initial (or bulk) reindex phase (stage 1) the application 304 receives a create or an update operation for one of the documents, instead of immediately updating or creating the document in the source index 308, the search and analytics engine which manages the source index 308 instead updates the document's “doc_status” field to indicated the update or the creation in the source index 308.

As illustrated in FIG. 4, exemplary architecture 400 includes a new alias “Index_alias_without_deletes doc_status< >d*” 430 provided between the application 304 and the source index 308. The “*” represents either the initial reindex phase of 1 (stage 1) or the incremental reindex phases (stage 2, stage 3, stage 4, etc.). The new alias provides a filtered view that excludes any documents marked as deleted (i.e., where doc_status matches a deletion pattern such as d1) after the start of the initial reindex phase (stage 1). The application 304 uses this new alias to retrieve documents that were not marked as deleted (d1) from the source index 308 until the initial reindex phase (stage 1) has been completed.

According to embodiments of the present disclosure, the new alias (e.g., “Index_alias_without_deletes doc_status< >d*” 430″) is to provide a consistent view of the source index 308 that excludes any documents currently marked as deleted. During the initial reindex phase (stage 1) or before or during the incremental reindex phases (stage 2, stage 3, stage 4, etc.) as delete operations occur, documents get marked (e.g., with d1, d2, etc.) and are filtered out by the new alias. Thus, the new alias always returns only “active” documents, regardless of when the deletion marking occurred. The multiple incremental reindex phases are steps to migrate data from the source index 308 to the destination index 312. The new alias, however, continuously filters out documents flagged as deleted to ensure that the application always sees a consistent, non-deleted view of the data.

FIG. 5 is a block diagram illustrating an exemplary architecture 500 for performing a reindex process according to one embodiment of the present disclosure. As illustrated in FIG. 5, exemplary architecture 500 also shows the initial reindex phase (stage 1) 535 whereby documents from the source index 308 are copied to the destination index 312. For example purposes only, Source Index Example Documents 520 includes documents 524 and 528. Document 524 includes three fields: Field 1, Field 2 and doc_status and a Doc. ID. The Doc. ID has a value of “XX”, Field 1 has a value of “a” and Field 2 has a value of “b”. Doc status has a value of “d1”. Document 528 also includes three fields: Field 1, Field 2 and doc_status and the Doc ID. Doc. ID has a value of “YY”, field 1 has a value of “c” and Field 2 has a value of “d”. Doc_status has a value of “null”. Also, for example purposes only, Destination Index Example Document 540 includes document 548. Document 548 only includes two fields: Field 1 and Field 2 and a Doc ID. The Doc. ID has a value of “YY”, Field 1 has a value of “c” and Field 2 has a value of “d”. When copying documents from the source index 308 to the destination index 312, the field “doc_status” is not included in the documents of the destination index 312.

As illustrated in FIG. 5, during the initial reindex phase (stage 1), document 524 is not copied from the source index 308 to the destination index 312 since document 524 has a “doc_status” field value of “d1”. Document 528, however, is copied from the source index 308 to the destination index 312 since document 528 has a “doc_status” field value of “null”. Document 528 is copied from the source index 308 to the destination index 312 as document 548 with only the fields Field 1 and Field 2 and not the “doc_status” field. The Doc ID is also included.

FIG. 6 is a block diagram illustrating an exemplary architecture 600 for performing a reindex process according to one embodiment of the present disclosure. As illustrated in FIG. 6, exemplary architecture 600 shows an incremental reindex phase (e.g., stage 2) 635. In the incremental reindex phase 2, the documents are no longer marked with d1 for deleted documents and p1 for updated or created documents, but instead, documents are marked with d2 for deleted documents and p2 for updated or created documents. Therefore, documents 650 and 654 are marked d2 for deleted documents and p2 for updated or created documents.

The incremental reindex phase 2 begins after the initial reindex phase (stage 1) has been completed. Documents that were updated or created during the execution of the initial reindex phase (stage 1) and afterwards (up until switching from p1 to p2) are marked with p1 and are captured by selecting documents marked with doc_status p1 and moving them to the destination index 312 (e.g., using the new alias “Index_alias_doc_status=p1” 630). Moreover, documents that were deleted during the execution of the initial reindex phase (stage 1) are deleted from the destination index 312. In other words, all operations that occur before stage 2 officially begins (e.g., start marking updates with p2 and deletes with d2) re captured by the p1/d1 status. The documents are deleted using the document ID of the deleted document found in the source index 308. For example purposes only, Source Index Example Documents 620 includes documents 624, 628, 650 and 654. Document 624 includes three fields: Field 1, Field 2 and doc_status and the Doc. ID. The Doc. ID has a value of “BB”, Field 1 has a value of “a” and Field 2 has a value of “b”. Doc status has a value of “d1”. Document 628 includes three fields: Field 1, Field 2 and doc_status and a Doc. ID. The Doc. ID has a value of “CC”, field 1 has a value of “e” and Field 2 has a value of “f”. Doc_status has a value of “p1”. Document 650 includes three fields: Field 1, Field 2 and doc_status and the Doc. ID. The Doc. ID has a value of “XX”, Field 1 has a value of “m” and Field 2 has a value of “n”. Doc_status has a value of “d2”. Document 654 includes three fields: Field 1, Field 2 and doc_status and a Doc. ID. The Doc. ID has a value of “YY”, field 1 has a value of “o” and Field 2 has a value of “p”. Doc_status has a value of “p2”. Also, for example purposes only, Destination Index Example Document 640 includes document 648. Document 648 only includes two fields: Field 1 and Field 2 and a Doc. ID. The Doc. ID has a value of “CC”, Field 1 has a value of “e” and Field 2 has a value of “f”. When copying documents from the source index 308 to the destination index 312, the field “doc_status” is not included in the documents of the destination index 312.

As illustrated in FIG. 6, during the incremental reindex phase 2 (e.g., stage 2), Document 628 is copied from the source index 308 to the destination index 312 since document 628 has a “doc_status” field value of “p1”. Document 628 is copied from the source index 308 to the destination index 312 as document 648 with only the fields Field 1 and Field 2 and not the “doc_status” field. Regarding document 624, since this document has a “doc_status” field value of “d1”, which occurred during the implementation of stage 1, document 624 is deleted from the destination index 312 using the Doc. ID BB. Moreover, documents 650 and 654 are not copied since these documents have a “doc_status” field value of “d2” and a “doc_status” field value of “p2”, respectively. Thus, according to an embodiment of the present disclosure, at the conclusion of the initial reindex phase (stage 1) and the beginning of the incremental reindex phase (stage 2), any document in the source index 308 that was marked with d1 (indicating a delete request during stage 1) has its corresponding document removed from the destination index 312. This ensures that the destination index 312 does not contain any documents that were deleted during stage 1.

FIG. 7 is a block diagram illustrating an exemplary architecture 700 for performing a reindex process according to one embodiment of the present disclosure. As illustrated in FIG. 7, exemplary architecture 700 shows the incremental reindex phase 3 (e.g., stage 3) 735 being performed whereby upon the incremental reindex phase 2 (e.g., stage 2) being completed, documents that were updated or created during stage 2 are captured by selecting documents marked with doc_status p2 and moving them to the destination index 312 (e.g., using the new alias “Index_alias_doc_status=p2” 730) and document that were deleted during the incremental reindex phase 2 (e.g., stage 2) are deleted using the deleted document's document ID found in the source index 308. Thus, all documents that were marked with d2 in the source index 308 during stage 3 but were not captured during stage 2 are deleted. For example purposes only, Source Index Example Documents 720 includes documents 724 and 728. Document 724 includes three fields: Field 1, Field 2 and doc_status and Doc. ID. Doc. ID has a value of “EE”, Field 1 has a value of “a” and Field 2 has a value of “b”. Doc_status has a value of “d2” . Document 728 also includes three fields: Field 1, Field 2 and doc_status and Doc. ID. Doc. ID has a value of “FF”, field 1 has a value of “c” and Field 2 has a value of “d”. Doc_status has a value of “p2”. Also, for example purposes only, Destination Index Example Document 740 includes document 748. Document 748 only includes two fields: Field 1 and Field 2 and Doc. ID. Doc. ID has a value of “FF”, Field 1 has a value of “c” and Field 2 has a value of “d”. When copying documents from the source index 308 to the destination index 312, the field “doc_status” is not included in the documents of the destination index 312.

As illustrated in FIG. 7, during the incremental reindex phase 3 (e.g., stage 3), Document 728 is copied from the source index 308 to the destination index 312 since document 728 has a “doc_status” field value of “p2”. Document 728 is copied from the source index 308 to the destination index 312 as document 748 with only the fields Doc. ID, Field 1 and Field 2 and not the “doc_status” field. Regarding document 724, since this document has a “doc_status” field value of “d2”, which occurred during the implementation of stage 2, document 724 is deleted from the destination index 312 using the Doc. ID EE. Thus, according to an embodiment of the present disclosure, at the conclusion of the incremental reindex phase 2 (stage 2) any document in the source index 308 that was marked with d2 (indicating a delete request during stage 2) has its corresponding document removed from the destination index 312. This ensures that the destination index 312 does not contain any documents that were deleted during stage 2.

Afterwards, a maximum time value in seconds “max_threshold value” is set. The maximum time value in seconds is a determination of how long it takes to complete the incremental reindex phases. A “max_iterations” value which is a positive number that indicates the maximum incremental phases required to enter the downtime phase.

Afterwards, the system enters a downtime state, where all write application access (create\update\delete operations) to the source index 308 are blocked. The downtime phase (final stage) is where documents are moved from the source index 308 to the destination index 312 using filter: doc_status=pi. Upon finish the reindex process, all documents from the destination index 312 that have document IDs that match the document IDs of documents having the “doc_status” field value di in the source index 308. This stage should be finished in less than the threshold value. The expectation that the final incremental reindex phase will finish within the max_threshold is based on empirical observations and past performance benchmarks. If previous incremental reindex phases consistently complete within the threshold, it is reasonable to expect the final incremental reindex phase to do the same.

However, while historical data suggests the final incremental reindex phase will complete within the threshold, system load, network latency, or other factors could cause deviations. Also the threshold is a performance target, not a guarantee. If past final incremental reindex phase times have been within limits, similar performance is expected. This approach balances the historical reindex stages trends with the recognition that slight variations may occur.

FIG. 8 is a block diagram illustrating an exemplary architecture 800 for performing a reindex process according to one embodiment of the present disclosure. As illustrated in FIG. 8, exemplary architecture 800 shows the downtime phase (e.g., final stage) 835 being performed. During the downtime phase, the number of incremental reindex phases (e.g., iterations) has been determined to be “m”. Afterwards, the search and analytics engine verifies that the number of documents in the source index without the document status value of d is equal to the number of documents in the destination index 312. The search and analytics engine then changes the source_alias of 930 from the source index 308 to the destination index 312 as illustrated in FIG. 9

FIGS. 10A-10C are diagrams illustrating a flowchart of an example method 1000 for performing a reindex process according to an embodiment of the present disclosure. While a general order of the steps of method 1000 is shown in FIGS. 10A-10C, method 1000 can include more or fewer steps or can arrange the order of the steps differently than those shown in FIGS. 10A-10C. Further, two or more steps may be combined into one step. Generally, method 1000 starts with a START operation at step 1004 and ends with an END operation at step 1076. Method 1000 can be executed as a set of computer-executable instructions executed by a data-processing system and encoded or stored on a computer readable medium. Hereinafter, method 1000 shall be explained with reference to systems, components, modules, software, data structures, user interfaces, etc. described in conjunction with FIGS. 1-9.

As illustrated in FIG. 10A, method 1000 starts with the START operation at step 1004 and proceeds to step 1008, where the search and analytics engine (e.g., processor or CPU 208) creates a source index with all documents having a unique document identifier (ID). After creating a source index with all documents having a unique document ID at step 1008, method 1000 proceeds to step 1012, where the search and analytics engine (e.g., processor or CPU 208) creates an alias pointing to the source index. After creating an alias pointing to the source index at step 1012, method 1000 proceeds to step 1016, where the search and analytics engine (e.g., processor or CPU 208) adds a document status field to the documents in the source index having a value of null (no change to the document), p (create or update document) or d (delete document).

After adding a document status field to the documents in the source index having a value of null (no change to the document), p (create or update document) or d (delete document) at step 1016, method 1000 proceeds to step 1020, where the search and analytics engine (e.g., processor or CPU 208) creates a destination index. After creating a destination index at step 1020, method 1000 proceeds to step 1024, where the search and analytics engine (e.g., processor or CPU 208) replaces the source alias with an alias without the deleted documents (e.g., filter the deleted documents). After replacing the source alias with the alias without the deleted documents at step 1024, method 1000 proceeds to step 1028, where the search and analytics engine (e.g., processor or CPU 208), starts an initial (or bulk) reindex phase (stage 1) by moving the documents from the source index to the destination index without the deleted documents and without the documents of the destination index including the document status field. After starting the initial reindex phase (stage 1) by moving the documents from the source index to the destination index without the deleted documents and without the documents of the destination index including the document status field at step 1028, method 1000 proceeds to step 1032, where the search and analytics engine (e.g., processor or CPU 208) starts marking the document status field in the source index with the value d2 instead of d1 for deleted documents and starts marking the document status field in the source index with the value p2 instead of p1 after completion of the initial reindex phase (stage 1).

After start marking the document status field in the source index with the value d2 instead of d1 for deleted documents and start marking the document status field in the source index with the value p2 instead of p1 after completion of the initial reindex phase (stage 1) at step 1032, method 1000 proceeds to step 1036 as illustrated in FIG. 10B, where the search and analytics engine (e.g., processor or CPU 208) verifies that no deleted documents were moved to the destination index during the execution of the initial reindex phase (stage 1), by deleting documents in the destination index that match document IDs in the source index having the document status field value of d1 at the incremental reindex phase 2 (stage 2). After verifying that no deleted documents were moved to the destination index during the execution of the initial reindex phase (stage 1), by deleting documents in the destination index that match document IDs in the source index having the document status field value of d1 at the incremental reindex phase 2 (stage 2), method 1000 proceeds to step 1040, where the search and analytics engine (e.g., processor or CPU 208) starts moving the documents from the source index to the destination index with a document status field value of p1 during the execution of the initial reindex phase (stage 1) also at the incremental reindex phase 2 (stage 2).

After start moving the documents from the source index to the destination index with a document status field value of p1 also at the incremental reindex phase 2 (stage 2) method 1000 proceeds to step 1044, where the search and analytics engine (e.g., processor or CPU 208), after the completion of the incremental reindex phase 2 (stage 2), sets a maximum threshold value (in seconds) to complete the update/create and delete operations and sets a maximum iterations (a positive number) (e.g., a maximum incremental reindex phase). After setting a maximum threshold value (in seconds) to complete the update/create and delete operations and setting a maximum number of iterations (a positive number) (e.g., a maximum incremental reindex phase), method 1000 proceeds to step 1048, where the search and analytics engine (e.g., processor or CPU 208) increments the reindex phase, marks deleted and updated documents with the incremented reindex phase value, verifies that no deleted documents were moved to the destination index during the execution of a previous reindex phase and moves updated documents from the source index to the destination index during the previous reindex phase. After marking deleted and updated documents with the incremented reindex phase value, verifying that no deleted documents were moved to the destination index during the execution of a previous reindex phase and moving updated documents from the source index to the destination index during the previous reindex phase, method 100 proceeds to decision step 1052, where the search and analytics engine (e.g., processor or CPU 208) determines if the maximum threshold or the maximum iterations has occurred. If the maximum threshold or the maximum iterations have not occurred (NO) at decision step 1052, method 1000 returns to step 1048 where the search and analytics engine (e.g., processor or CPU 208) increments the reindex phase, marks deleted and updated documents with the incremented reindex phase value, verifies that no deleted documents were moved to the destination index during the execution of a previous reindex phase and moves updated documents from the source index to the destination index during the previous reindex phase.

If the maximum threshold or the maximum iterations have occurred (YES) at decision step 1052, method 1000 proceeds to step 1056, where the search and analytics engine (e.g., processor or CPU 208) enters the downtime phase (final stage) by blocking write application access (create\update\delete operations) to the source index. After entering the downtime phase (stage 3) by blocking write application access (create \update\delete operations) to the source index at step 1056, method 1000 proceeds to step 1060 as illustrated in FIG. 10C, where the search and analytics engine (e.g., processor or CPU 208) verifies that no deleted documents were moved to the destination index during the maximum iteration (e.g., maximum incremental reindex phase) and moves updated documents from the source index to the destination index during the maximum incremental reindex phase. After verifying that no deleted documents were moved to the destination index during the maximum iteration (e.g., maximum incremental reindex phase) and move updated documents from the source index to the destination index during the maximum incremental reindex phase at step 1060, method 1000 proceeds to step 1064, where the search and analytics engine (e.g., processor or CPU 208) verifies that the number of documents in the source index without the document status value of dm (where “m” is the maximum iteration of phase) is equal to the number of documents in the destination index. After verifying that the number of documents in the source index without the document status value of dm (where “m” is the maximum iteration of phase) is equal to the number of documents in the destination index at step 1064, method 1000 proceeds to step 1068, where the search and analytics engine (e.g., processor or CPU 208) changes the source alias of the source index to the destination index. After changing the source alias of the source index to the destination index at step 1068, method 1000 proceeds to step 1072, where the search and analytics engine (e.g., processor or CPU 208) has the application to make operations against the destination index instead of the source index after the downtime phase (final stage) has been completed. After having the application to make operations against the destination index instead of the source index after the downtime phase (final stage) has been completed at step 1072, method 1000 ends at END operation at step 1076.

The present disclosure, in various aspects, embodiments, and/or configurations, includes components, methods, processes, systems, and/or apparatus substantially as depicted and described herein, including various aspects, embodiments, configurations embodiments, sub-combinations, and/or subsets thereof. Those of skill in the art will understand how to make and use the disclosed aspects, embodiments, and/or configurations after understanding the present disclosure. The present disclosure, in various aspects, embodiments, and/or configurations, includes providing devices and processes in the absence of items not depicted and/or described herein or in various aspects, embodiments, and/or configurations hereof, including in the absence of such items as may have been used in previous devices or processes, e.g., for improving performance, achieving ease and lor reducing cost of implementation.

The foregoing discussion has been presented for purposes of illustration and description. The foregoing is not intended to limit the disclosure to the form or forms disclosed herein. In the foregoing Detailed Description for example, various features of the disclosure are grouped together in one or more aspects, embodiments, and/or configurations for the purpose of streamlining the disclosure. The features of the aspects, embodiments, and/or configurations of the disclosure may be combined in alternate aspects, embodiments, and/or configurations other than those discussed above. This method of disclosure is not to be interpreted as reflecting an intention that the claims require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed aspect, embodiment, and/or configuration. Thus, the following claims are hereby incorporated into this Detailed Description, with each claim standing on its own as a separate preferred embodiment of the disclosure.

Moreover, though the description has included description of one or more aspects, embodiments, and/or configurations and certain variations and modifications, other variations, combinations, and modifications are within the scope of the disclosure, e.g., as may be within the skill and knowledge of those in the art, after understanding the present disclosure. It is intended to obtain rights which include alternative aspects, embodiments, and/or configurations to the extent permitted, including alternate, interchangeable and/or equivalent structures, functions, ranges or steps to those claimed, whether or not such alternate, interchangeable and/or equivalent structures, functions, ranges or steps are disclosed herein, and without intending to publicly dedicate any patentable subject matter.

Claims

1. A method for performing a reindex process, comprising:

initiating, by a search engine executing on a processor, an initial reindex phase, without entering into a reindex downtime period;
performing, by the search engine executing on the processor, incremental reindex phases, without entering into the reindex downtime period, the performing comprising, during each incremental reindex phase, adjusting changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase;
determining, by the search engine executing on the processor, without entering into the reindex downtime period, a maximum incremental reindex phase; and
after determining the maximum incremental reindex phase, entering, by the search engine executing on the processor, a reduced reindex downtime period to capture any remaining changes to the documents and ensure that the destination index is fully synchronized with the source index, wherein the reindex downtime period is greater than the reduced reindex downtime period.

2. The method according to claim 1, further comprising:

creating, without entering into the reindex downtime period, a document status field for each document of the plurality of documents in the source index,
wherein each document of the plurality of documents includes a unique document identification, and
wherein the document status field is assigned one of the following values: no change for no changes to the documents, change for updates or changes to the documents or delete for deleted documents.

3. The method according to claim 2, further comprising filtering out, during the initial reindex phase, the documents in the source index with the document status field value of delete by moving the documents with the document status field values of no change and change to the destination index.

4. The method according to claim 3, wherein adjusting changes to documents in the source index moved to the destination index includes moving documents from the source index to the destination index with the document status field value of change adjusted during the execution of the initial reindex phase and deleting documents from the destination index using the unique document identification of the documents in the source index that were adjusted during the execution of the initial reindex phase.

5. The method according to claim 1, wherein each of the reindex downtime period and the reduced reindex downtime period includes blocking write application access to the source index.

6. The method according to claim 3, further comprising, creating, without entering into the reindex downtime period, a source alias pointing to the source index.

7. The method according to claim 6, wherein the filtering out, during the initial reindex phase, the documents in the source index with the document status field value of delete includes replacing the source alias with an alias without the deleted documents.

8. The method according to claim 6, further comprising changing the source alias of the source index to the destination index.

9. The method according to claim 2, further comprising, verifying that a number of documents in the source index without the document status field value of delete is equal to a number of documents in the destination index.

10. A system for performing a reindex process, comprising:

a processor; and
a memory coupled with and readable by the processor and storing therein a set of instructions which, when executed by the processor, causes a search engine to: initiate an initial reindex phase, without entering into a reindex downtime period; perform incremental reindex phases, without entering into the reindex downtime period, the performing comprising, during each incremental reindex phase, adjusting changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase; determine without entering into the reindex downtime period, a maximum incremental reindex phase; and after determining the maximum incremental reindex phase, enter a reduced reindex downtime period to capture any remaining changes to the documents and ensure that the destination index is fully synchronized with the source index, wherein the reindex downtime period is greater than the reduced reindex downtime period.

11. The system according to claim 10, wherein the instructions when executed by the processor further cause the search engine to perform:

creating, without entering into the reindex downtime period, a document status field for each document of the plurality of documents in the source index, wherein each document of the plurality of documents includes a unique document identification, and wherein the document status field is assigned one of the following values: no change for no changes to the documents, change for updates or changes to the documents or delete for deleted documents.

12. The system according to claim 11, wherein the instructions when executed by the processor further cause the search engine to perform filtering out, during the initial reindex phase, the documents in the source index with the document status field value of delete by moving the documents with the document status field values of no change and change to the destination index.

13. The system according to claim 12, wherein adjusting changes to documents in the source index moved to the destination index further cause the search engine to perform moving documents from the source index to the destination index with the document status field value of change adjusted during the execution of the initial reindex phase and deleting documents from the destination index using the unique document identification of the documents in the source index that were adjusted during the execution of the initial reindex phase.

14. The method according to claim 10, wherein each of the reindex downtime period and the reduced reindex downtime period includes blocking write application access to the source index.

15. The system according to claim 12, wherein the instructions when executed by the processor further cause the search engine to perform creating, without entering into the reindex downtime period, a source alias pointing to the source index.

16. The system according to claim 15, wherein the filtering out, during the initial reindex phase, the documents in the source index with the document status field value of delete includes replacing the source alias with an alias without the deleted documents.

17. The system according to claim 15, wherein the instructions when executed by the processor further cause the search engine to perform changing the source alias of the source index to the destination index.

18. The system according to claim 11, wherein the instructions when executed by the processor further cause the search engine to perform verifying that a number of documents in the source index without the document status field value of delete is equal to a number of documents in the destination index.

19. A non-transitory computer readable medium having stored thereon instructions that, when executed by a processor, cause a search engine to perform a reindex process, comprising:

initiating an initial reindex phase, without entering into a reindex downtime period;
performing incremental reindex phases, without entering into the reindex downtime period, the performing comprising, during each incremental reindex phase, adjusting changes to documents of a plurality of documents in a source index moved to a destination index during a previous incremental reindex phase;
determining, without entering into the reindex downtime period, a maximum incremental reindex phase; and
after determining the maximum incremental reindex phase, entering a reduced reindex downtime period to capture any remaining changes to the documents and ensure that the destination index is fully synchronized with the source index, wherein the reindex downtime period is greater than the reduced reindex downtime period.

20. The non-transitory computer readable medium according to claim 19, wherein the instructions when executed by the processor further cause the search engine to perform:

creating, without entering into the reindex downtime period, a document status field for each document of the plurality of documents in the source index, wherein each document of the plurality of documents includes a unique document identification, and wherein the document status field is assigned one of the following values: no change for no changes to the documents, change for updates or changes to the documents or delete for deleted documents.
Patent History
Publication number: 20260377380
Type: Application
Filed: May 20, 2025
Publication Date: Nov 26, 2026
Applicant: MICRO FOCUS LLC (Wilmington, DE)
Inventors: Doron Shalom (Yehud), Dani Levi (Yehud)
Application Number: 19/213,246
Classifications
International Classification: G06F 16/21 (20190101); G06F 16/23 (20190101); G06F 16/93 (20190101);