An indexing method for retrieving documents

By generating retrieval documents in the file system and storing metadata in a distributed retrieval cluster, the problem of high cost of obtaining the full path and massive modifications involved in renaming directory metadata is solved, efficient synchronization and concurrent operations are achieved, and retrieval is improved. accuracy and real-time.

CN118550882BActive Publication Date: 2024-10-22SANDSTONE DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411012983.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-10-22
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

When existing methods synchronize file system metadata to a distributed retrieval cluster, there are problems such as high cost of obtaining the full path, massive data modifications involved in renaming directory metadata, and concurrency conflicts, which affect the accuracy and real-time performance of retrieval.

Method used

By generating retrieval documents in the file system and storing file and directory metadata in a distributed retrieval cluster, the need to obtain the full path is reduced. Directory documents are only modified when directory metadata is modified, without affecting file documents, and concurrent operations are allowed.

Benefits of technology

It improves the speed and efficiency of synchronous modifications, reduces system pressure and the risk of parallel errors, and ensures the accuracy and real-time nature of retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550882B_ABST
    Figure CN118550882B_ABST
Patent Text Reader

Abstract

The present invention discloses an indexing method for retrieving documents, including: generating a retrieval document according to metadata of a file system with an index, and synchronously sending it to a distributed retrieval cluster; the distributed retrieval cluster receives a retrieval request and performs retrieval to obtain a target file document; according to the target file document, obtaining the file name and target parent directory ID of the target retrieval document; matching the corresponding target directory document; reading the directory full path of the target directory document; according to the file name of the target file document and the directory full path of the target directory document, obtaining the full path of the target file document; responding according to the full path of the target file document. When the present invention synchronizes file metadata from the file system to the distributed retrieval cluster, it is not necessary to obtain the full path of the file, and when modifying the directory metadata, it is only necessary to modify the directory document, and the operations on the file document can be executed concurrently, thereby improving synchronization efficiency, reducing configuration requirements, and preventing parallel errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data indexing, and in particular to an indexing method for retrieving documents. Background Art

[0002] Elasticsearch is a real-time distributed search and analysis engine. The file system can synchronously push its own metadata to the distributed search cluster of elasticsearch, that is, transfer the task of file search to elasticsearch to complete, so as to meet the needs of fast search. However, when synchronizing its own metadata to the distributed search cluster, the existing methods will have the following problems: On the one hand, the unit of general file system operation is directory or file, and the handle generally only holds its current path in the directory, that is, the file name and the parent directory ID. When it wants to obtain the full path, it must traverse layer by layer. If there is no cache, the cost of traversal will be relatively large, especially when the directory hierarchy is deep. On the other hand, renaming directory metadata requires changing the file names of the directory and all corresponding search documents under the directory, including file documents and directory documents, to ensure that their full paths are correct. This will involve massive data modifications and will place a heavy burden on the file system and distributed search cluster. Furthermore, during the push of the synchronization background, the creation or modification operation may have concurrent conflicts with other file push operations, which will affect the accuracy of the retrieved documents. If creation or modification is not allowed to be performed concurrently, it may take a long time to create or modify the file, which will block the push of other file operations to the distributed search cluster and affect the real-time performance of elasticsearch retrieval. Summary of the invention

[0003] The present invention provides a method for indexing a retrieved document, the method comprising:

[0004] Generate retrieval documents based on the metadata of the indexed file system and send them synchronously to the distributed retrieval cluster;

[0005] The distributed search cluster receives the search request, and performs a search according to the search request to obtain a target file document;

[0006] According to the target file document, obtain the file name and target parent directory ID of the target search document;

[0007] According to the target parent directory ID, match the corresponding target directory document;

[0008] Read the full directory path of the target directory document;

[0009] Obtain the full path of the target file document according to the file name of the target file document and the full directory path of the target directory document;

[0010] Respond according to the full path of the target file document.

[0011] Preferably, the metadata of the file system includes: file metadata and directory metadata;

[0012] The file metadata includes at least: file name, file ID and file parent directory ID;

[0013] The directory metadata includes at least: the directory full path, the directory ID and the directory parent directory ID.

[0014] Preferably, the file name of the file metadata corresponds to the current name of the file metadata in the file system;

[0015] The full directory path of the directory metadata corresponds to the full path of the directory metadata in the file system;

[0016] The file parent directory ID is the ID of the directory at the previous level corresponding to the file;

[0017] The parent directory ID of the directory is the ID of the directory at the previous level corresponding to the directory;

[0018] The file ID is used as a unique identifier of the file in the indexed file system;

[0019] The directory ID serves as a unique identifier of the directory in the indexed file system.

[0020] Preferably, the retrieval documents include: file documents and directory documents;

[0021] The file document is stored in the distributed retrieval cluster for recording the file metadata;

[0022] The directory document is stored in the distributed retrieval cluster and is used to record the directory metadata.

[0023] Preferably, generating a search document according to metadata of the indexed file system and synchronously sending it to a distributed search cluster includes:

[0024] The file system creates first file metadata and synchronizes it to the distributed search cluster to generate a first file document; the first file document is used to store the first file metadata;

[0025] The file system creates the first file metadata and generates a first operation log accordingly;

[0026] Synchronously playing back the first operation log in the background;

[0027] Obtaining the first file metadata according to the first operation log, and sending it to a distributed retrieval cluster;

[0028] The distributed retrieval cluster generates and stores the first file document according to the first file metadata.

[0029] Preferably, the step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0030] The file system creates first directory metadata and synchronizes it to the distributed search cluster to generate a first directory document; the first directory document is used to store the first directory metadata;

[0031] recursively checking, through the file system, whether the first directory metadata exists; if not, creating the first directory metadata and generating a second operation log;

[0032] The synchronous background plays back the second operation log;

[0033] Obtaining the first directory metadata according to the second operation log, and sending it to the distributed retrieval cluster;

[0034] The distributed retrieval cluster generates and stores the first directory document according to the first directory metadata.

[0035] Preferably, the step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0036] The file system deletes the second file metadata and deletes the corresponding second file document from the distributed retrieval cluster; the second file document is used to store the second file metadata;

[0037] The file system deletes the metadata of the second file and generates a third operation log;

[0038] The synchronous background plays back the third operation log;

[0039] Generate a first deletion request according to the third operation log and send it to the distributed retrieval cluster;

[0040] The distributed retrieval cluster matches and deletes the second file document according to the first deletion request.

[0041] Preferably, the step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0042] The file system deletes the second directory metadata and deletes the corresponding second directory document from the distributed retrieval cluster; the second directory document is used to store the second directory metadata;

[0043] The file system deletes the metadata of the second directory and generates a fourth operation log;

[0044] The synchronous background plays back the fourth operation log;

[0045] Generate a second deletion request according to the fourth operation log and send it to the distributed retrieval cluster;

[0046] The distributed retrieval cluster matches and deletes the second directory document according to the second deletion request.

[0047] Preferably, the step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0048] The file system renames the third directory metadata, correspondingly modifying the directory full path of all sub-directory documents under the third directory document; the third directory document is used to store the third directory metadata;

[0049] The file system renames the third directory metadata and generates a fifth operation log;

[0050] The synchronous background plays back the fifth operation log;

[0051] Obtaining the third directory metadata according to the fifth operation log;

[0052] According to the third directory metadata, through the file system, recursively enumerate all subdirectories under the third directory metadata downward;

[0053] According to the directory parent directory ID of the third directory metadata, through the file system, recursively upward to the root directory of the file system, and obtain all parent directories under the third directory metadata;

[0054] According to all subdirectories and all parent directories under the third directory metadata, obtain the full path of the third directory metadata;

[0055] According to the full path of the third directory metadata, the distributed retrieval cluster matches and modifies the corresponding third directory document.

[0056] Preferably, the step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0057] The file system renames the third file metadata, correspondingly modifying the file name of the third file document; the third file document is used to store the third file metadata;

[0058] The file system renames the third file metadata and generates a sixth operation log;

[0059] The synchronous background plays back the sixth operation log;

[0060] Obtaining the third file metadata according to the sixth operation log;

[0061] Constructing a file renaming request according to the three file metadata and sending it to the distributed search cluster;

[0062] The distributed retrieval cluster matches and modifies the corresponding third file document according to the file renaming request.

[0063] The technical solution provided by the present invention has the following beneficial effects: on the one hand, when the solution of the present invention synchronizes the file metadata from the file system to the distributed retrieval cluster, it is not necessary to obtain the full path of the file, thus reducing the push links and system pressure; on the other hand, when modifying the directory metadata, the solution of the present invention only needs to modify the directory document, and does not need to modify the file document. The number of retrieval documents that need to be modified is reduced by several orders of magnitude, which improves the speed and efficiency of synchronous modification. Furthermore, when the solution of the present invention renames the directory metadata, the object of the operation is only the directory, and there is no conflict between the document object of the document operation, and the operations can be performed concurrently without blocking the synchronization process of the overall system, which effectively improves the synchronization efficiency, reduces the configuration requirements and prevents parallel errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 A schematic diagram of an embodiment of an indexing method for retrieving documents in an embodiment of the present invention;

[0065] Figure 2 A schematic diagram of the traditional renaming directory metadata;

[0066] Figure 3 A schematic diagram of renaming directory metadata in an embodiment of the present invention;

[0067] Figure 4 This is a schematic diagram of synchronizing metadata from a file system to a distributed search cluster to generate search documents in an embodiment of the present invention. Description of the drawings:

[0069] The path name is the corresponding file name or directory full path. DETAILED DESCRIPTION

[0070] An embodiment of the present invention provides an indexing method for retrieving documents, which is used for dddd. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0071] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of an indexing method for retrieving documents in an embodiment of the present invention includes:

[0072] 101. Generate a search document according to the metadata of the indexed file system, and send it to the distributed search cluster synchronously;

[0073] It is understandable that the execution subject of the present invention may be an indexing device for retrieving documents, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0074] 102. The distributed search cluster receives a search request, and performs a search according to the search request to obtain a target file document;

[0075] 103. According to the target file document, obtain the file name and target parent directory ID of the target search document;

[0076] 104. Match the corresponding target directory document according to the target parent directory ID;

[0077] 105. Read the full directory path of the target directory document;

[0078] 106. Acquire the full path of the target file document according to the file name of the target file document and the full directory path of the target directory document;

[0079] 107. Respond according to the full path of the target file document.

[0080] Preferably, the metadata of the file system includes: file metadata and directory metadata;

[0081] The file metadata includes at least: file name, file ID and file parent directory ID;

[0082] The directory metadata includes at least: the directory full path, the directory ID and the directory parent directory ID.

[0083] In a preferred embodiment, the file name of the file metadata corresponds to the current name of the file metadata in the file system;

[0084] The full directory path of the directory metadata corresponds to the full path of the directory metadata in the file system;

[0085] The file parent directory ID is the ID of the directory at the previous level corresponding to the file;

[0086] The parent directory ID of the directory is the ID of the directory at the previous level corresponding to the directory;

[0087] The file ID is used as a unique identifier of the file in the indexed file system;

[0088] The directory ID serves as a unique identifier of the directory in the indexed file system.

[0089] In a preferred embodiment, the retrieval documents include: file documents and directory documents;

[0090] The file document is stored in the distributed retrieval cluster for recording the file metadata;

[0091] The directory document is stored in the distributed retrieval cluster and is used to record the directory metadata.

[0092] In a preferred embodiment, generating a search document according to metadata of the indexed file system and synchronously sending it to a distributed search cluster includes:

[0093] The file system creates first file metadata and synchronizes it to the distributed search cluster to generate a first file document; the first file document is used to store the first file metadata;

[0094] The file system creates the first file metadata and generates a first operation log accordingly;

[0095] Synchronously playing back the first operation log in the background;

[0096] Obtaining the first file metadata according to the first operation log, and sending it to a distributed retrieval cluster;

[0097] The distributed retrieval cluster generates and stores the first file document according to the first file metadata.

[0098] In a preferred embodiment, the step of generating a search document according to metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0099] The file system creates first directory metadata and synchronizes it to the distributed search cluster to generate a first directory document; the first directory document is used to store the first directory metadata;

[0100] recursively checking, through the file system, whether the first directory metadata exists; if not, creating the first directory metadata and generating a second operation log;

[0101] The synchronous background plays back the second operation log;

[0102] Obtaining the first directory metadata according to the second operation log, and sending it to the distributed retrieval cluster;

[0103] The distributed retrieval cluster generates and stores the first directory document according to the first directory metadata.

[0104] In a preferred embodiment, the step of generating a search document according to metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0105] The file system deletes the second file metadata and deletes the corresponding second file document from the distributed retrieval cluster; the second file document is used to store the second file metadata;

[0106] The file system deletes the metadata of the second file and generates a third operation log;

[0107] The synchronous background plays back the third operation log;

[0108] Generate a first deletion request according to the third operation log and send it to the distributed retrieval cluster;

[0109] The distributed retrieval cluster matches and deletes the second file document according to the first deletion request.

[0110] In a preferred embodiment, the step of generating a search document according to metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0111] The file system deletes the second directory metadata and deletes the corresponding second directory document from the distributed retrieval cluster; the second directory document is used to store the second directory metadata;

[0112] The file system deletes the metadata of the second directory and generates a fourth operation log;

[0113] The synchronous background plays back the fourth operation log;

[0114] Generate a second deletion request according to the fourth operation log and send it to the distributed retrieval cluster;

[0115] The distributed retrieval cluster matches and deletes the second directory document according to the second deletion request.

[0116] In a preferred embodiment, the step of generating a search document according to metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0117] The file system renames the third directory metadata, correspondingly modifying the directory full path of all sub-directory documents under the third directory document; the third directory document is used to store the third directory metadata;

[0118] The file system renames the third directory metadata and generates a fifth operation log;

[0119] The synchronous background plays back the fifth operation log;

[0120] Obtaining the third directory metadata according to the fifth operation log;

[0121] According to the third directory metadata, through the file system, recursively enumerate all subdirectories under the third directory metadata downward;

[0122] According to the directory parent directory ID of the third directory metadata, through the file system, recursively upward to the root directory of the file system, and obtain all parent directories under the third directory metadata;

[0123] According to all subdirectories and all parent directories under the third directory metadata, obtain the full path of the third directory metadata;

[0124] According to the full path of the third directory metadata, the distributed retrieval cluster matches and modifies the corresponding third directory document.

[0125] In a preferred embodiment, the step of generating a search document according to metadata of the indexed file system and synchronously sending the search document to the distributed search cluster further includes:

[0126] The file system renames the third file metadata, correspondingly modifying the file name of the third file document; the third file document is used to store the third file metadata;

[0127] The file system renames the third file metadata and generates a sixth operation log;

[0128] The synchronous background plays back the sixth operation log;

[0129] Obtaining the third file metadata according to the sixth operation log;

[0130] Constructing a file renaming request according to the three file metadata and sending it to the distributed search cluster;

[0131] The distributed retrieval cluster matches and modifies the corresponding third file document according to the file renaming request.

[0132] In a specific embodiment, Figure 2 As shown: For example, in a file system, a system file is divided into 4 levels, the root directory " / " - a main directory "dir" - 2 subdirectories "aaa" "bbb" - 3 files "1" "2" "3". In the traditional distributed synchronization method, the search documents synchronized to the distributed search cluster are "dir / aaa / 1" "dir / aaa / 2" "dir / bbb / 3". Before traditional synchronization, the full path of the file needs to be obtained to generate the corresponding search document. When it wants to obtain the full path, it has to traverse each level layer by layer. If there is no cache, the cost of traversal will be relatively large, especially when the directory level is deep.

[0133] When the traditional method renames the directory metafile, it is based on the retrieval document operation, which requires changing a large number of retrieval documents and will conflict with other synchronization operations of the retrieval documents. Figure 2 In , to rename the main directory "dir" to "dir1", each search document needs to be modified to "dir1 / aaa / 1", "dir1 / aaa / 2", "dir1 / bbb / 3". When the document hierarchy is deep and the number is large, it will be a massive operation. Furthermore, for example, when renaming a directory document, if the file document is also modified at this time, the path will be confused and cannot be performed synchronously.

[0134] Traditionally, to create or modify directory metadata, you need to change the path name of the corresponding directory document and all corresponding search documents under the directory to ensure that the full path is correct. This may involve massive data modification, which will place a heavy burden on the file system and distributed search cluster. Furthermore, in the synchronization background, operations such as creating, deleting, or renaming any metadata may conflict with other metadata operations, which will affect the accuracy of the searched documents. If creation or modification concurrency is not allowed, it may take a long time to operate, which will block the execution of other file operations and affect the real-time performance of elasticsearch retrieval.

[0135] In a specific embodiment, Figure 3As shown, the method of an embodiment of the present invention does not need to obtain the full path of the file when synchronizing metadata, but retains the synchronized file parent directory ID or the directory parent directory ID. When renaming the directory metadata, only the corresponding directory document needs to be modified without affecting the synchronization operation of the file document.

[0136] For example Figure 3 In the example, renaming the main directory "dir" to "dir1" will only modify the directory files to "dir1 / aaa" and "dir1 / bbb", and will not operate on the file files "1", "2" and "3".

[0137] like Figure 4 As shown, since the file document does not record the full path, the search request initiated by the user does not obtain the search document with the full path, which is not friendly to the customer's subsequent file access operations. Therefore, during the search, the search request is modified, and the distributed plug-in automatically matches the corresponding target directory document according to the file parent directory ID of the target file document; reads the full directory path of the target directory document; concatenates the full directory path of the target directory document according to the file name of the target file document to obtain the full path of the target file document; and responds according to the full path of the target file document.

[0138] In the embodiments of the present invention, the beneficial effects are as follows: on the one hand, when the solution of the present invention synchronizes the file metadata from the file system to the distributed retrieval cluster, there is no need to obtain the full path of the file, which reduces the push links and system pressure; on the other hand, when modifying the directory metadata, the solution of the present invention only needs to modify the directory document, and there is no need to modify the file document. The number of retrieval documents that need to be modified is reduced by several orders of magnitude, which improves the speed and efficiency of synchronous modification. Furthermore, when the solution of the present invention renames the directory metadata, the object of the operation is only the directory, and there is no conflict between the document object of the document operation, and the operations can be performed concurrently without blocking the synchronization process of the overall system, which effectively improves the synchronization efficiency, reduces the configuration requirements and prevents parallel errors.

[0139] If the integrated unit described in the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0140] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An indexing method for retrieving documents, applied to real-time distributed search and analysis engines, It is characterized in that The indexing method for retrieving documents includes: Generate retrieval documents based on the metadata of the indexed file system and send them synchronously to the distributed retrieval cluster; The distributed search cluster receives the search request, and performs a search according to the search request to obtain a target file document; According to the target file document, obtain the file name and target parent directory ID of the target search document; According to the target parent directory ID, match the corresponding target directory document; Read the full directory path of the target directory document; Obtain the full path of the target file document according to the file name of the target file document and the full directory path of the target directory document; Respond according to the full path of the target file document; The metadata of the file system includes: file metadata and directory metadata; The file metadata includes at least: file name, file ID and file parent directory ID; The directory metadata includes at least: the directory full path, directory ID and directory parent directory ID; The file name of the file metadata corresponds to the current name of the file metadata in the file system; The full directory path of the directory metadata corresponds to the full path of the directory metadata in the file system; The file parent directory ID is the ID of the directory at the previous level corresponding to the file; The parent directory ID of the directory is the ID of the directory at the previous level corresponding to the directory; The file ID is used as a unique identifier of the file in the indexed file system; The directory ID is used as a unique identifier of the directory in the indexed file system; The retrieval documents include: file documents and directory documents; The file document is stored in the distributed retrieval cluster for recording the file metadata; The directory document is stored in the distributed retrieval cluster and is used to record the directory metadata; The step of generating a search document according to the metadata of the indexed file system and synchronously sending the document to the distributed search cluster includes: The file system creates first file metadata and synchronizes it to the distributed search cluster to generate a first file document; the first file document is used to store the first file metadata; The file system creates the first file metadata and generates a first operation log accordingly; Synchronously playing back the first operation log in the background; Obtaining the first file metadata according to the first operation log, and sending it to a distributed retrieval cluster; The distributed retrieval cluster generates and stores the first file document according to the first file metadata; The step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster also includes: The file system creates first directory metadata and synchronizes it to the distributed search cluster to generate a first directory document; the first directory document is used to store the first directory metadata; recursively checking, through the file system, whether the first directory metadata exists; if not, creating the first directory metadata and generating a second operation log; The synchronous background plays back the second operation log; Obtaining the first directory metadata according to the second operation log, and sending it to the distributed retrieval cluster; The distributed retrieval cluster generates and stores the first directory document according to the first directory metadata.

2. The indexing method for retrieving documents according to claim 1, It is characterized in that The step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster also includes: The file system deletes the second file metadata and deletes the corresponding second file document from the distributed retrieval cluster; the second file document is used to store the second file metadata; The file system deletes the metadata of the second file and generates a third operation log; The synchronous background plays back the third operation log; Generate a first deletion request according to the third operation log and send it to the distributed retrieval cluster; The distributed retrieval cluster matches and deletes the second file document according to the first deletion request.

3. The indexing method for retrieving documents according to claim 2, It is characterized in that The step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster also includes: The file system deletes the second directory metadata and deletes the corresponding second directory document from the distributed retrieval cluster; the second directory document is used to store the second directory metadata; The file system deletes the metadata of the second directory and generates a fourth operation log; The synchronous background plays back the fourth operation log; Generate a second deletion request according to the fourth operation log and send it to the distributed retrieval cluster; The distributed retrieval cluster matches and deletes the second directory document according to the second deletion request.

4. The indexing method for retrieving documents according to claim 3, It is characterized in that The step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster also includes: The file system renames the third directory metadata, correspondingly modifying the directory full path of all sub-directory documents under the third directory document; the third directory document is used to store the third directory metadata; The file system renames the third directory metadata and generates a fifth operation log; The synchronous background plays back the fifth operation log; Obtaining the third directory metadata according to the fifth operation log; According to the third directory metadata, through the file system, recursively enumerate all subdirectories under the third directory metadata downward; According to the directory parent directory ID of the third directory metadata, through the file system, recursively upward to the root directory of the file system, and obtain all parent directories under the third directory metadata; According to all subdirectories and all parent directories under the third directory metadata, obtain the full path of the third directory metadata; According to the full path of the third directory metadata, the distributed retrieval cluster matches and modifies the corresponding third directory document.

5. The indexing method for retrieving documents according to claim 4, It is characterized in that The step of generating a search document according to the metadata of the indexed file system and synchronously sending the search document to the distributed search cluster also includes: The file system renames the third file metadata, correspondingly modifying the file name of the third file document; the third file document is used to store the third file metadata; The file system renames the third file metadata and generates a sixth operation log; The synchronous background plays back the sixth operation log; Obtaining the third file metadata according to the sixth operation log; Constructing a file renaming request according to the three file metadata and sending it to the distributed search cluster; The distributed retrieval cluster matches and modifies the corresponding third file document according to the file renaming request.