Repository Indexing
You can build an index for your project to improve the speed and accuracy of AI-powered code search, making the results more aligned with your needs. You can also configure ignored files to specify the files to be excluded from indexing. Ignored files will be completely excluded from indexing to protect your sensitive data.
Indexing Modes
Two indexing modes are provided. Choose the one that best suits your workflow.
- Local indexing: In this mode, the system builds a graph index locally by parsing local project code files, and precisely retrieving calls, dependencies, and inheritance between functions, classes, and files.
- Cloud indexing: In this mode, the system builds a vector index, enabling intelligent, feature-level retrieval and precise matching based on code semantics. If you are using the free/basic/professional edition, ensure that your account has been assigned a seat. If not, cloud indexing will fail.
| Dimension | Local Indexing | Cloud Indexing |
|---|---|---|
| Storage location | Index files are stored locally (under .codegraph in the current project's root directory). | For the initial build, the complete index package is uploaded and stored in the cloud. Incremental indexes generated due to code changes are stored locally (under .codeartsdoer/.codebase in the current project's root directory). |
| Search capabilities | Search by keyword, symbol, and file name is supported. | Semantic understanding and repository-wide code logic analysis are supported. |
| Build rules |
| |
| Update rules | Automatic update upon file changes | Indexes are automatically updated when Auto Update is enabled and the number of repository files is less than 50,000. In other scenarios, manual operations are required. |
Constraints
| Category | Description |
|---|---|
| Language | Java, JavaScript, TypeScript, Go, ArkTS, C, C++, Python, Vue, and Lua. |
| Total number of indexed code files |
|
| Function |
|
Building a Repository Index
- Log in to CodeArts Agent IDE as instructed in Quick Start.
- Click
in the upper right corner of the page to access the global settings page of the IDE. - Click Repository Index to view the index building result. If the page matches Figure 1, your project has fewer than 50,000 code files and the index has been built. If not, you can build a local index or cloud index as required.
- Enter what you want to search for to view the code search results.
Find all calls to is_input_required in the repository, including cross-file call relationships.
Figure 2 Viewing search results
Managing Repository Indexes
In addition to creating an index, you can also resume or delete it. For details, see Table 3.
| Operation | Instruction |
|---|---|
| Pause cloud indexing | Click Pause to halt the indexing process at any time. |
| Resume cloud indexing | To resume a paused indexing process, click Resume Indexing. |
| Synchronize cloud updates | Click Update for incremental index update. The system checks for changes since the last update, indexes the added or modified code files, and skips unchanged files to save time. |
| Recreate cloud indexing | If you have deleted an index and want to rebuild it, click Create Index to begin a complete indexing process. |
| Delete a cloud index | To clear all current index data, click Delete Index. In addition to deleting a repository index on the client, you can also perform the deletion on the console. For details, see Deleting Cloud Indexes. |
| Ignore files in the current directory | If you want to exclude any file in the current folder from being indexed, click Configure. Then, in .codebaseignore, specify the file name. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
