cocoindex 0.1.82__tar.gz → 0.1.83__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. {cocoindex-0.1.82 → cocoindex-0.1.83}/Cargo.lock +1 -1
  2. {cocoindex-0.1.82 → cocoindex-0.1.83}/Cargo.toml +1 -1
  3. {cocoindex-0.1.82 → cocoindex-0.1.83}/PKG-INFO +1 -1
  4. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/academic_papers_index.md +1 -1
  5. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/codebase_index.md +71 -49
  6. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/custom_targets.md +17 -21
  7. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/docs_to_knowledge_graph.md +60 -26
  8. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/image_search.md +1 -1
  9. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/manual_extraction.md +1 -1
  10. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/multi_format_index.md +1 -1
  11. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/patient_form_extraction.md +1 -1
  12. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/photo_search.md +1 -1
  13. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/product_recommendation.md +1 -1
  14. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/examples/simple_vector_index.md +1 -1
  15. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/components/GitHubButton/index.tsx +26 -6
  16. cocoindex-0.1.83/docs/static/img/examples/academic_papers_index/cover.png +0 -0
  17. cocoindex-0.1.83/docs/static/img/examples/codebase_index/chunk.png +0 -0
  18. cocoindex-0.1.83/docs/static/img/examples/codebase_index/cover.png +0 -0
  19. cocoindex-0.1.83/docs/static/img/examples/codebase_index/flow.png +0 -0
  20. cocoindex-0.1.83/docs/static/img/examples/codebase_index/usecase.png +0 -0
  21. cocoindex-0.1.83/docs/static/img/examples/custom_targets/convert.png +0 -0
  22. cocoindex-0.1.83/docs/static/img/examples/custom_targets/cover.png +0 -0
  23. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/cover.png +0 -0
  24. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/dedupe.png +0 -0
  25. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/export_document.png +0 -0
  26. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/export_relationship.png +0 -0
  27. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/extract_relationship.png +0 -0
  28. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/flow.png +0 -0
  29. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/relationship.png +0 -0
  30. cocoindex-0.1.83/docs/static/img/examples/docs_to_knowledge_graph/summary.png +0 -0
  31. cocoindex-0.1.83/docs/static/img/examples/image_search/cover.png +0 -0
  32. cocoindex-0.1.83/docs/static/img/examples/manual_extraction/cover.png +0 -0
  33. cocoindex-0.1.83/docs/static/img/examples/multi_format_index/cover.png +0 -0
  34. cocoindex-0.1.83/docs/static/img/examples/patient_form_extraction/cover.png +0 -0
  35. cocoindex-0.1.83/docs/static/img/examples/photo_search/cover.png +0 -0
  36. cocoindex-0.1.83/docs/static/img/examples/product_recommendation/cover.png +0 -0
  37. cocoindex-0.1.83/docs/static/img/examples/simple_vector_index/cover.png +0 -0
  38. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/README.md +1 -2
  39. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/README.md +1 -1
  40. cocoindex-0.1.83/examples/postgres_source/.env +7 -0
  41. cocoindex-0.1.83/examples/postgres_source/.env.example +22 -0
  42. cocoindex-0.1.83/examples/postgres_source/README.md +60 -0
  43. cocoindex-0.1.83/examples/postgres_source/main.py +134 -0
  44. cocoindex-0.1.83/examples/postgres_source/prepare_source_data.sql +94 -0
  45. cocoindex-0.1.83/examples/postgres_source/pyproject.toml +9 -0
  46. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/flow.py +14 -6
  47. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/op.py +10 -24
  48. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/sources.py +20 -0
  49. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/spec.rs +0 -10
  50. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/builder/analyzer.rs +20 -35
  51. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/builder/exec_ctx.rs +6 -12
  52. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/builder/flow_builder.rs +32 -3
  53. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/db_tracking.rs +55 -0
  54. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/db_tracking_setup.rs +36 -15
  55. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/dumper.rs +7 -4
  56. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/row_indexer.rs +334 -362
  57. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/source_indexer.rs +14 -2
  58. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/lib_context.rs +1 -1
  59. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/interface.rs +4 -4
  60. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/mod.rs +1 -0
  61. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/registration.rs +38 -5
  62. cocoindex-0.1.83/src/ops/registry.rs +87 -0
  63. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sdk.rs +0 -1
  64. cocoindex-0.1.83/src/ops/shared/mod.rs +1 -0
  65. cocoindex-0.1.83/src/ops/shared/postgres.rs +74 -0
  66. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/amazon_s3.rs +7 -6
  67. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/azure_blob.rs +7 -7
  68. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/google_drive.rs +7 -7
  69. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/local_file.rs +7 -7
  70. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/mod.rs +1 -0
  71. cocoindex-0.1.83/src/ops/sources/postgres.rs +609 -0
  72. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/postgres.rs +7 -73
  73. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/service/flows.rs +7 -4
  74. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/driver.rs +128 -83
  75. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/states.rs +25 -9
  76. cocoindex-0.1.83/src/utils/db.rs +16 -0
  77. cocoindex-0.1.82/docs/static/img/examples/academic_papers_index.png +0 -0
  78. cocoindex-0.1.82/docs/static/img/examples/codebase_index.png +0 -0
  79. cocoindex-0.1.82/docs/static/img/examples/custom_targets.png +0 -0
  80. cocoindex-0.1.82/docs/static/img/examples/docs_to_knowledge_graph.png +0 -0
  81. cocoindex-0.1.82/docs/static/img/examples/image_search.png +0 -0
  82. cocoindex-0.1.82/docs/static/img/examples/manual_extraction.png +0 -0
  83. cocoindex-0.1.82/docs/static/img/examples/multi_format_index.png +0 -0
  84. cocoindex-0.1.82/docs/static/img/examples/patient_form_extraction.png +0 -0
  85. cocoindex-0.1.82/docs/static/img/examples/photo_search.png +0 -0
  86. cocoindex-0.1.82/docs/static/img/examples/product_recommendation.png +0 -0
  87. cocoindex-0.1.82/docs/static/img/examples/simple_vector_index.png +0 -0
  88. cocoindex-0.1.82/src/ops/registry.rs +0 -38
  89. cocoindex-0.1.82/src/utils/db.rs +0 -45
  90. {cocoindex-0.1.82 → cocoindex-0.1.83}/.cargo/config.toml +0 -0
  91. {cocoindex-0.1.82 → cocoindex-0.1.83}/.env.lib_debug +0 -0
  92. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
  93. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
  94. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/scripts/update_version.sh +0 -0
  95. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/workflows/CI.yml +0 -0
  96. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/workflows/_doc_release.yml +0 -0
  97. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/workflows/_test.yml +0 -0
  98. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/workflows/docs.yml +0 -0
  99. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/workflows/format.yml +0 -0
  100. {cocoindex-0.1.82 → cocoindex-0.1.83}/.github/workflows/release.yml +0 -0
  101. {cocoindex-0.1.82 → cocoindex-0.1.83}/.gitignore +0 -0
  102. {cocoindex-0.1.82 → cocoindex-0.1.83}/.pre-commit-config.yaml +0 -0
  103. {cocoindex-0.1.82 → cocoindex-0.1.83}/CODE_OF_CONDUCT.md +0 -0
  104. {cocoindex-0.1.82 → cocoindex-0.1.83}/CONTRIBUTING.md +0 -0
  105. {cocoindex-0.1.82 → cocoindex-0.1.83}/LICENSE +0 -0
  106. {cocoindex-0.1.82 → cocoindex-0.1.83}/README.md +0 -0
  107. {cocoindex-0.1.82 → cocoindex-0.1.83}/dev/neo4j.yaml +0 -0
  108. {cocoindex-0.1.82 → cocoindex-0.1.83}/dev/postgres.yaml +0 -0
  109. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/.gitignore +0 -0
  110. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/README.md +0 -0
  111. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/about/community.md +0 -0
  112. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/ai/llm.mdx +0 -0
  113. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/contributing/guide.md +0 -0
  114. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/contributing/new_built_in_target.mdx +0 -0
  115. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/contributing/setup_dev_environment.md +0 -0
  116. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/basics.md +0 -0
  117. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/cli.mdx +0 -0
  118. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/data_example.svg +0 -0
  119. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/data_types.mdx +0 -0
  120. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/flow_def.mdx +0 -0
  121. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/flow_example.svg +0 -0
  122. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/flow_methods.mdx +0 -0
  123. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/core/settings.mdx +0 -0
  124. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/custom_ops/custom_functions.mdx +0 -0
  125. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/custom_ops/custom_targets.mdx +0 -0
  126. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/examples/index.md +0 -0
  127. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/getting_started/installation.md +0 -0
  128. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/getting_started/markdown_files.zip +0 -0
  129. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/getting_started/overview.md +0 -0
  130. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/getting_started/quickstart.md +0 -0
  131. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/ops/functions.md +0 -0
  132. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/ops/sources.md +0 -0
  133. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/ops/targets.md +0 -0
  134. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/query.mdx +0 -0
  135. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/tutorials/live_updates.md +0 -0
  136. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docs/tutorials/manage_flow_dynamically.mdx +0 -0
  137. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/docusaurus.config.ts +0 -0
  138. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/package.json +0 -0
  139. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/sidebars.ts +0 -0
  140. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/css/custom.css +0 -0
  141. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/theme/DocCard/index.tsx +0 -0
  142. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/theme/DocCard/styles.module.css +0 -0
  143. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/theme/DocCardList/index.tsx +0 -0
  144. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/theme/DocCardList/styles.module.css +0 -0
  145. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/src/theme/Root.js +0 -0
  146. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/static/.nojekyll +0 -0
  147. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/static/img/docusaurus.png +0 -0
  148. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/static/img/favicon.ico +0 -0
  149. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/static/img/icon.svg +0 -0
  150. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/static/img/incremental-etl.gif +0 -0
  151. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/static/robots.txt +0 -0
  152. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/tsconfig.json +0 -0
  153. {cocoindex-0.1.82 → cocoindex-0.1.83}/docs/yarn.lock +0 -0
  154. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/amazon_s3_embedding/.env.example +0 -0
  155. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/amazon_s3_embedding/.gitignore +0 -0
  156. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/amazon_s3_embedding/README.md +0 -0
  157. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/amazon_s3_embedding/main.py +0 -0
  158. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/amazon_s3_embedding/pyproject.toml +0 -0
  159. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/azure_blob_embedding/.env.example +0 -0
  160. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/azure_blob_embedding/.gitignore +0 -0
  161. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/azure_blob_embedding/README.md +0 -0
  162. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/azure_blob_embedding/main.py +0 -0
  163. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/azure_blob_embedding/pyproject.toml +0 -0
  164. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/code_embedding/.env +0 -0
  165. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/code_embedding/README.md +0 -0
  166. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/code_embedding/main.py +0 -0
  167. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/code_embedding/pyproject.toml +0 -0
  168. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/.env +0 -0
  169. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/.gitignore +0 -0
  170. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/data/bizarre_animals.md +0 -0
  171. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/data/chunk_norris.md +0 -0
  172. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/main.py +0 -0
  173. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/custom_output_files/pyproject.toml +0 -0
  174. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/docs_to_knowledge_graph/.env +0 -0
  175. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/docs_to_knowledge_graph/README.md +0 -0
  176. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/docs_to_knowledge_graph/main.py +0 -0
  177. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
  178. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/.env +0 -0
  179. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/README.md +0 -0
  180. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/images/Carter_welcomes_Reagan.jpg +0 -0
  181. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/images/Solvay_conference_1927.jpg +0 -0
  182. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/images/Steve_Jobs_and_Bill_Gates_(522695099).jpg +0 -0
  183. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/images/einplanck3.jpg +0 -0
  184. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/main.py +0 -0
  185. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/face_recognition/pyproject.toml +0 -0
  186. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/.dockerignore +0 -0
  187. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/.env +0 -0
  188. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/README.md +0 -0
  189. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/compose.yaml +0 -0
  190. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/dockerfile +0 -0
  191. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
  192. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/main.py +0 -0
  193. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/fastapi_server_docker/requirements.txt +0 -0
  194. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/gdrive_text_embedding/.env.example +0 -0
  195. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/gdrive_text_embedding/.gitignore +0 -0
  196. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/gdrive_text_embedding/README.md +0 -0
  197. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/gdrive_text_embedding/main.py +0 -0
  198. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/gdrive_text_embedding/pyproject.toml +0 -0
  199. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/.env +0 -0
  200. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/README.md +0 -0
  201. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/colpali_main.py +0 -0
  202. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/.gitignore +0 -0
  203. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/index.html +0 -0
  204. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/package-lock.json +0 -0
  205. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/package.json +0 -0
  206. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/src/App.jsx +0 -0
  207. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/src/main.jsx +0 -0
  208. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/src/style.css +0 -0
  209. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/frontend/vite.config.js +0 -0
  210. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/img/cat1.jpeg +0 -0
  211. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/img/dog1.jpeg +0 -0
  212. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/img/elephant1.jpg +0 -0
  213. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/img/giraffe.jpg +0 -0
  214. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/main.py +0 -0
  215. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/image_search/pyproject.toml +0 -0
  216. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/live_updates/.env +0 -0
  217. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/live_updates/README.md +0 -0
  218. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/live_updates/data/bizarre_animals.md +0 -0
  219. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/live_updates/data/chunk_norris.md +0 -0
  220. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/live_updates/main.py +0 -0
  221. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/live_updates/pyproject.toml +0 -0
  222. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/.env +0 -0
  223. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/README.md +0 -0
  224. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/main.py +0 -0
  225. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
  226. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
  227. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
  228. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
  229. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/manuals_llm_extraction/pyproject.toml +0 -0
  230. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/.env +0 -0
  231. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/README.md +0 -0
  232. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/main.py +0 -0
  233. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/pyproject.toml +0 -0
  234. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/1706.03762v7.pdf +0 -0
  235. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/1810.04805v2.pdf +0 -0
  236. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/2502.06786v3.pdf +0 -0
  237. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/healthcare_industry_test_p101.jpg +0 -0
  238. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/healthcare_industry_test_p86.jpg +0 -0
  239. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/healthcare_industry_test_p9.jpg +0 -0
  240. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/restaurant_brands_international_2023.jpg +0 -0
  241. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/multi_format_indexing/source_files/sweetgreen_2023.jpg +0 -0
  242. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/.env.example +0 -0
  243. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/.gitignore +0 -0
  244. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/main.py +0 -0
  245. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/papers/1706.03762v7.pdf +0 -0
  246. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/papers/1810.04805v2.pdf +0 -0
  247. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/papers/2502.06786v3.pdf +0 -0
  248. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/papers/2502.20346v1.pdf +0 -0
  249. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/paper_metadata/pyproject.toml +0 -0
  250. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/.env.example +0 -0
  251. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/README.md +0 -0
  252. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/data/README.md +0 -0
  253. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_David_Artificial.docx +0 -0
  254. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Emily_Artificial.pdf +0 -0
  255. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Joe_Artificial.pdf +0 -0
  256. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_From_Jane_Artificial.docx +0 -0
  257. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/main.py +0 -0
  258. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/patient_intake_extraction/pyproject.toml +0 -0
  259. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/.env +0 -0
  260. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/README.md +0 -0
  261. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/main.py +0 -0
  262. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
  263. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
  264. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
  265. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/pdf_embedding/pyproject.toml +0 -0
  266. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/.env +0 -0
  267. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/README.md +0 -0
  268. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/img/cocoinsight.png +0 -0
  269. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/img/neo4j.png +0 -0
  270. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/main.py +0 -0
  271. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p1.json +0 -0
  272. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p2.json +0 -0
  273. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p3.json +0 -0
  274. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p4.json +0 -0
  275. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p5.json +0 -0
  276. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p6.json +0 -0
  277. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p7.json +0 -0
  278. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p8.json +0 -0
  279. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/products/p9.json +0 -0
  280. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/product_recommendation/pyproject.toml +0 -0
  281. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/.env +0 -0
  282. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/README.md +0 -0
  283. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/Text_Embedding.ipynb +0 -0
  284. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/main.py +0 -0
  285. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
  286. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
  287. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
  288. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding/pyproject.toml +0 -0
  289. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding_qdrant/.env +0 -0
  290. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding_qdrant/README.md +0 -0
  291. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding_qdrant/main.py +0 -0
  292. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
  293. {cocoindex-0.1.82 → cocoindex-0.1.83}/examples/text_embedding_qdrant/pyproject.toml +0 -0
  294. {cocoindex-0.1.82 → cocoindex-0.1.83}/pyproject.toml +0 -0
  295. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/__init__.py +0 -0
  296. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/auth_registry.py +0 -0
  297. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/cli.py +0 -0
  298. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/convert.py +0 -0
  299. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/functions.py +0 -0
  300. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/index.py +0 -0
  301. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/lib.py +0 -0
  302. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/llm.py +0 -0
  303. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/py.typed +0 -0
  304. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/runtime.py +0 -0
  305. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/setting.py +0 -0
  306. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/setup.py +0 -0
  307. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/subprocess_exec.py +0 -0
  308. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/targets.py +0 -0
  309. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/tests/__init__.py +0 -0
  310. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/tests/test_convert.py +0 -0
  311. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/tests/test_optional_database.py +0 -0
  312. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/tests/test_transform_flow.py +0 -0
  313. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/tests/test_typing.py +0 -0
  314. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/tests/test_validation.py +0 -0
  315. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/typing.py +0 -0
  316. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/user_app_loader.py +0 -0
  317. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/utils.py +0 -0
  318. {cocoindex-0.1.82 → cocoindex-0.1.83}/python/cocoindex/validation.py +0 -0
  319. {cocoindex-0.1.82 → cocoindex-0.1.83}/ruff.toml +0 -0
  320. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/duration.rs +0 -0
  321. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/field_attrs.rs +0 -0
  322. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/json_schema.rs +0 -0
  323. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/mod.rs +0 -0
  324. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/schema.rs +0 -0
  325. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/base/value.rs +0 -0
  326. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/builder/analyzed_flow.rs +0 -0
  327. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/builder/mod.rs +0 -0
  328. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/builder/plan.rs +0 -0
  329. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/evaluator.rs +0 -0
  330. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/indexing_status.rs +0 -0
  331. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/live_updater.rs +0 -0
  332. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/memoization.rs +0 -0
  333. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/mod.rs +0 -0
  334. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/execution/stats.rs +0 -0
  335. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/lib.rs +0 -0
  336. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/anthropic.rs +0 -0
  337. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/gemini.rs +0 -0
  338. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/litellm.rs +0 -0
  339. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/mod.rs +0 -0
  340. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/ollama.rs +0 -0
  341. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/openai.rs +0 -0
  342. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/openrouter.rs +0 -0
  343. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/vllm.rs +0 -0
  344. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/llm/voyage.rs +0 -0
  345. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/factory_bases.rs +0 -0
  346. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/functions/embed_text.rs +0 -0
  347. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/functions/extract_by_llm.rs +0 -0
  348. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/functions/mod.rs +0 -0
  349. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/functions/parse_json.rs +0 -0
  350. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/functions/split_recursively.rs +0 -0
  351. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/functions/test_utils.rs +0 -0
  352. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/py_factory.rs +0 -0
  353. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/shared/mod.rs +0 -0
  354. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/sources/shared/pattern_matcher.rs +0 -0
  355. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/kuzu.rs +0 -0
  356. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/mod.rs +0 -0
  357. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/neo4j.rs +0 -0
  358. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/qdrant.rs +0 -0
  359. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/shared/mod.rs +0 -0
  360. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/shared/property_graph.rs +0 -0
  361. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/ops/targets/shared/table_columns.rs +0 -0
  362. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/prelude.rs +0 -0
  363. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/py/convert.rs +0 -0
  364. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/py/mod.rs +0 -0
  365. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/server.rs +0 -0
  366. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/service/error.rs +0 -0
  367. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/service/mod.rs +0 -0
  368. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/settings.rs +0 -0
  369. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/auth_registry.rs +0 -0
  370. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/components.rs +0 -0
  371. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/db_metadata.rs +0 -0
  372. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/flow_features.rs +0 -0
  373. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/setup/mod.rs +0 -0
  374. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/utils/concur_control.rs +0 -0
  375. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/utils/fingerprint.rs +0 -0
  376. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/utils/immutable.rs +0 -0
  377. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/utils/mod.rs +0 -0
  378. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/utils/retryable.rs +0 -0
  379. {cocoindex-0.1.82 → cocoindex-0.1.83}/src/utils/yaml_ser.rs +0 -0
@@ -1283,7 +1283,7 @@ dependencies = [
1283
1283
 
1284
1284
  [[package]]
1285
1285
  name = "cocoindex"
1286
- version = "0.1.82"
1286
+ version = "0.1.83"
1287
1287
  dependencies = [
1288
1288
  "anyhow",
1289
1289
  "async-openai",
@@ -2,7 +2,7 @@
2
2
  name = "cocoindex"
3
3
  # Version used for local development is always higher than others to take precedence.
4
4
  # Will be overridden for specific release versions.
5
- version = "0.1.82"
5
+ version = "0.1.83"
6
6
  edition = "2024"
7
7
  rust-version = "1.88"
8
8
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.1.82
3
+ Version: 0.1.83
4
4
  Requires-Dist: click>=8.1.8
5
5
  Requires-Dist: rich>=14.0.0
6
6
  Requires-Dist: python-dotenv>=1.1.0
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/academic_papers_index
6
6
  canonicalUrl: '/examples/academic_papers_index'
7
7
  sidebar_custom_props:
8
- image: /img/examples/academic_papers_index.png
8
+ image: /img/examples/academic_papers_index/cover.png
9
9
  tags: [vector-index, metadata]
10
10
  tags: [vector-index, metadata]
11
11
  ---
@@ -5,30 +5,57 @@ sidebar_class_name: hidden
5
5
  slug: /examples/code_index
6
6
  canonicalUrl: '/examples/code_index'
7
7
  sidebar_custom_props:
8
- image: /img/examples/codebase_index.png
8
+ image: /img/examples/codebase_index/cover.png
9
9
  tags: [vector-index, codebase]
10
10
  tags: [vector-index, codebase]
11
11
  ---
12
12
 
13
- import { GitHubButton, YouTubeButton } from '../../../src/components/GitHubButton';
13
+ import { GitHubButton, YouTubeButton, DocumentationButton } from '../../../src/components/GitHubButton';
14
14
 
15
15
  <GitHubButton url="https://github.com/cocoindex-io/cocoindex/tree/main/examples/code_embedding"/>
16
16
  <YouTubeButton url="https://youtu.be/G3WstvhHO24?si=ndYfM0XRs03_hVPR" />
17
17
 
18
- ## Setup
18
+ ## Overview
19
+ In this tutorial, we will build codebase index. [CocoIndex](https://github.com/cocoindex-io/cocoindex) provides built-in support for codebase chunking, with native Tree-sitter support. It works with large codebases, and can be updated in near real-time with incremental processing - only reprocess what's changed.
19
20
 
20
- If you don't have Postgres installed, please follow [installation guide](https://cocoindex.io/docs/getting_started/installation).
21
+ ## Use Cases
22
+ A wide range of applications can be built with an effective codebase index that is always up-to-date. Some examples include:
21
23
 
22
- ## Add the codebase as a source.
24
+ ![Use case illustration](/img/examples/codebase_index/usecase.png)
25
+
26
+ - Semantic code context for AI coding agents like Claude, Codex, Gemini CLI.
27
+ - MCP for code editors such as Cursor, Windsurf, and VSCode.
28
+ - Context-aware code search applications—semantic code search, natural language code retrieval.
29
+ - Context for code review agents—AI code review, automated code analysis, code quality checks, pull request summarization.
30
+ - Automated code refactoring, large-scale code migration.
31
+ - Enhance SRE workflows: enable rapid root cause analysis, incident response, and change impact assessment by indexing infrastructure-as-code, deployment scripts, and config files for semantic search and lineage tracking.
32
+ - Automatically generate design documentation from code—keep design docs up-to-date.
33
+
34
+ ## Flow Overview
35
+
36
+ ![Flow Overview](/img/examples/codebase_index/flow.png)
37
+
38
+ The flow is composed of the following steps:
39
+
40
+ - Read code files from the local filesystem
41
+ - Extract file extensions, to get the language of the code for Tree-sitter to parse
42
+ - Split code into semantic chunks using Tree-sitter
43
+ - Generate embeddings for each chunk
44
+ - Store in a vector database for retrieval
23
45
 
24
- Ingest files from the CocoIndex codebase root directory.
46
+ ## Setup
47
+ - Install Postgres, follow [installation guide](https://cocoindex.io/docs/getting_started/installation#-install-postgres).
48
+ - Install CocoIndex
49
+ ```bash
50
+ pip install -U cocoindex
51
+ ```
52
+
53
+ ## Add the codebase as a source.
54
+ We will index the CocoIndex codebase. Here we use the `LocalFile` source to ingest files from the CocoIndex codebase root directory.
25
55
 
26
56
  ```python
27
57
  @cocoindex.flow_def(name="CodeEmbedding")
28
58
  def code_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoindex.DataScope):
29
- """
30
- Define an example flow that embeds files into a vector database.
31
- """
32
59
  data_scope["files"] = flow_builder.add_source(
33
60
  cocoindex.sources.LocalFile(path="../..",
34
61
  included_patterns=["*.py", "*.rs", "*.toml", "*.md", "*.mdx"],
@@ -40,16 +67,15 @@ def code_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoind
40
67
  - Exclude files and directories starting `.`, `target` in the root and `node_modules` under any directory.
41
68
 
42
69
  `flow_builder.add_source` will create a table with sub fields (`filename`, `content`).
43
- See [documentation](https://cocoindex.io/docs/ops/sources) for more details.
70
+ <DocumentationButton href="https://cocoindex.io/docs/ops/sources" text="Sources" />
44
71
 
45
72
 
46
- ## Process each file and collect the information.
73
+ ## Process each file and collect the information
47
74
 
48
- ### Extract the extension of a filename
75
+ ### Extract the extension of a filename
49
76
 
50
77
  We need to pass the language (or extension) to Tree-sitter to parse the code.
51
78
  Let's define a function to extract the extension of a filename while processing each file.
52
- You can find the documentation for custom function [here](https://cocoindex.io/docs/core/custom_function).
53
79
 
54
80
  ```python
55
81
  @cocoindex.op.function()
@@ -58,52 +84,43 @@ def extract_extension(filename: str) -> str:
58
84
  return os.path.splitext(filename)[1]
59
85
  ```
60
86
 
61
- Then we are going to process each file and collect the information.
62
-
63
- ```python
64
- with data_scope["files"].row() as file:
65
- file["extension"] = file["filename"].transform(extract_extension)
66
- ```
67
-
68
- Here we extract the extension of the filename and store it in the `extension` field.
69
-
87
+ <DocumentationButton href="https://cocoindex.io/docs/custom_ops/custom_functions" text="Custom Function" margin="0 0 16px 0" />
70
88
 
71
89
  ### Split the file into chunks
72
-
73
- We will chunk the code with Tree-sitter.
74
- We use the `SplitRecursively` function to split the file into chunks.
75
- It is integrated with Tree-sitter, so you can pass in the language to the `language` parameter.
76
- To see all supported language names and extensions, see the documentation [here](https://cocoindex.io/docs/ops/functions#splitrecursively). All the major languages are supported, e.g., Python, Rust, JavaScript, TypeScript, Java, C++, etc. If it's unspecified or the specified language is not supported, it will be treated as plain text.
90
+ We use the `SplitRecursively` function to split the file into chunks. `SplitRecursively` is CocoIndex building block, with native integration with Tree-sitter. You need to pass in the language to the `language` parameter if you are processing code.
77
91
 
78
92
  ```python
79
93
  with data_scope["files"].row() as file:
94
+ # Extract the extension of the filename.
95
+ file["extension"] = file["filename"].transform(extract_extension)
80
96
  file["chunks"] = file["content"].transform(
81
97
  cocoindex.functions.SplitRecursively(),
82
98
  language=file["extension"], chunk_size=1000, chunk_overlap=300)
83
99
  ```
100
+ <DocumentationButton href="https://cocoindex.io/docs/ops/functions#splitrecursively" text="SplitRecursively" margin="0 0 16px 0" />
84
101
 
102
+ ![SplitRecursively](/img/examples/codebase_index/chunk.png)
85
103
 
86
104
  ### Embed the chunks
87
-
88
105
  We use `SentenceTransformerEmbed` to embed the chunks.
89
- You can refer to the documentation [here](https://cocoindex.io/docs/ops/functions#sentencetransformerembed).
90
106
 
91
107
  ```python
92
108
  @cocoindex.transform_flow()
93
109
  def code_to_embedding(text: cocoindex.DataSlice[str]) -> cocoindex.DataSlice[list[float]]:
94
- """
95
- Embed the text using a SentenceTransformer model.
96
- """
97
110
  return text.transform(
98
111
  cocoindex.functions.SentenceTransformerEmbed(
99
112
  model="sentence-transformers/all-MiniLM-L6-v2"))
100
113
  ```
101
114
 
102
- Then for each chunk, we will embed it using the `code_to_embedding` function. and collect the embeddings to the `code_embeddings` collector.
115
+ <DocumentationButton href="https://cocoindex.io/docs/ops/functions#sentencetransformerembed" text="SentenceTransformerEmbed" margin="0 0 16px 0" />
116
+
117
+ :::tip
118
+ `@cocoindex.transform_flow()` is needed to share the transformation across indexing and query. When building a vector index and querying against it, the embedding computation must remain consistent between indexing and querying.
119
+ :::
103
120
 
104
- `@cocoindex.transform_flow()` is needed to share the transformation across indexing and query. We build a vector index and query against it,
105
- the embedding computation needs to be consistent between indexing and querying. See [documentation](https://cocoindex.io/docs/query#transform-flow) for more details.
121
+ <DocumentationButton href="https://cocoindex.io/docs/query#transform-flow" text="Transform Flow" margin="0 0 16px 0" />
106
122
 
123
+ Then for each chunk, we will embed it using the `code_to_embedding` function, and collect the embeddings to the `code_embeddings` collector.
107
124
 
108
125
  ```python
109
126
  with data_scope["files"].row() as file:
@@ -113,10 +130,7 @@ with data_scope["files"].row() as file:
113
130
  code=chunk["text"], embedding=chunk["embedding"])
114
131
  ```
115
132
 
116
-
117
- ### 2.4 Collect the embeddings
118
-
119
- Export the embeddings to a table.
133
+ ### Export the embeddings
120
134
 
121
135
  ```python
122
136
  code_embeddings.export(
@@ -126,8 +140,7 @@ code_embeddings.export(
126
140
  vector_indexes=[cocoindex.VectorIndex("embedding", cocoindex.VectorSimilarityMetric.COSINE_SIMILARITY)])
127
141
  ```
128
142
 
129
- We use Consine Similarity to measure the similarity between the query and the indexed data.
130
- To learn more about Consine Similarity, see [Wiki](https://en.wikipedia.org/wiki/Cosine_similarity).
143
+ We use [Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to measure the similarity between the query and the indexed data.
131
144
 
132
145
  ## Query the index
133
146
  We match against user-provided text by a SQL query, reusing the embedding operation in the indexing flow.
@@ -180,13 +193,16 @@ if __name__ == "__main__":
180
193
 
181
194
  ## Run the index setup & update
182
195
 
183
- 🎉 Now you are all set!
196
+ - Install dependencies
197
+ ```bash
198
+ pip install -e .
199
+ ```
184
200
 
185
- Run following command to setup and update the index.
186
- ```sh
187
- cocoindex update --setup main.py
188
- ```
189
- You'll see the index updates state in the terminal
201
+ - Setup and update the index
202
+ ```sh
203
+ cocoindex update --setup main.py
204
+ ```
205
+ You'll see the index updates state in the terminal
190
206
 
191
207
 
192
208
  ## Test the query
@@ -197,7 +213,13 @@ python main.py
197
213
  ```
198
214
 
199
215
  When you see the prompt, you can enter your search query. for example: spec.
216
+ The returned results - each entry contains score (Cosine Similarity), filename, and the code snippet that get matched.
200
217
 
201
- You can find the search results in the terminal
218
+ ## CocoInsight
219
+ To get a better understanding of the indexing flow, you can use CocoInsight to help the development step by step.
220
+ To spin up, it is super easy.
202
221
 
203
- The returned results - each entry contains score (Cosine Similarity), filename, and the code snippet that get matched.
222
+ ```
223
+ cocoindex server main.py -ci
224
+ ```
225
+ Follow the url from the terminal - `https://cocoindex.io/cocoinsight` to access the CocoInsight.
@@ -5,23 +5,17 @@ sidebar_class_name: hidden
5
5
  slug: /examples/custom_targets
6
6
  canonicalUrl: '/examples/custom_targets'
7
7
  sidebar_custom_props:
8
- image: /img/examples/custom_targets.png
8
+ image: /img/examples/custom_targets/cover.png
9
9
  tags: [custom-building-blocks]
10
10
  tags: [custom-building-blocks]
11
11
  ---
12
- import { GitHubButton, YouTubeButton } from '../../../src/components/GitHubButton';
12
+ import { GitHubButton, YouTubeButton, DocumentationButton } from '../../../src/components/GitHubButton';
13
13
 
14
14
  <GitHubButton url="https://github.com/cocoindex-io/cocoindex/tree/main/examples/custom_output_files"/>
15
15
 
16
16
  ## Overview
17
17
 
18
- Let’s walk through a simple example—exporting `.md` files as `.html` using a custom file-based target. This project monitors folder changes and continuously converts markdown to HTML incrementally.
19
- Check out the full [source code](https://github.com/cocoindex-io/cocoindex/tree/main/examples/custom_output_files).
20
-
21
- The overall flow is simple:
22
- This example focuses on
23
- - how to configure your custom target
24
- - the flow effortless picks up the changes in the source, recomputes only what's changed and export to the target
18
+ Let’s walk through a simple example—exporting `.md` files as `.html` using a custom file-based target. This project monitors folder changes and continuously converts markdown to HTML incrementally. The overall flow is simple and primarily focuses on how to configure your custom target.
25
19
 
26
20
 
27
21
  ## Ingest files
@@ -33,16 +27,13 @@ Ingest a list of markdown files:
33
27
  def custom_output_files(
34
28
  flow_builder: cocoindex.FlowBuilder, data_scope: cocoindex.DataScope
35
29
  ) -> None:
36
- """
37
- Define an example flow that exports markdown files to HTML files.
38
- """
39
30
  data_scope["documents"] = flow_builder.add_source(
40
31
  cocoindex.sources.LocalFile(path="data", included_patterns=["*.md"]),
41
32
  refresh_interval=timedelta(seconds=5),
42
33
  )
43
34
  ```
44
35
  This ingestion creates a table with `filename` and `content` fields.
45
-
36
+ <DocumentationButton href="https://cocoindex.io/docs/ops/sources" text="Sources" />
46
37
 
47
38
  ## Process each file and collect
48
39
 
@@ -50,11 +41,12 @@ Define custom function that converts markdown to HTML
50
41
 
51
42
  ```python
52
43
  @cocoindex.op.function()
53
-
54
44
  def markdown_to_html(text: str) -> str:
55
45
  return _markdown_it.render(text)
56
46
  ```
57
47
 
48
+ <DocumentationButton href="https://cocoindex.io/docs/custom_ops/custom_functions" text="Custom Function" margin="0 0 16px 0" />
49
+
58
50
  Define data collector and transform each document to html.
59
51
 
60
52
  ```python
@@ -63,12 +55,15 @@ with data_scope["documents"].row() as doc:
63
55
  doc["html"] = doc["content"].transform(markdown_to_html)
64
56
  output_html.collect(filename=doc["filename"], html=doc["html"])
65
57
  ```
58
+ ![Convert markdown to html](/img/examples/custom_targets/convert.png)
66
59
 
67
60
 
68
61
  ## Define the custom target
69
62
 
70
63
  ### Define the target spec
71
64
 
65
+ <DocumentationButton href="https://cocoindex.io/docs/custom_ops/custom_targets#target-spec" text="Target Spec" margin="0 0 16px 0" />
66
+
72
67
  The target spec contains a directory for output files:
73
68
 
74
69
  ```python
@@ -76,8 +71,11 @@ class LocalFileTarget(cocoindex.op.TargetSpec):
76
71
  directory: str
77
72
  ```
78
73
 
74
+
79
75
  ### Implement the connector
80
76
 
77
+ <DocumentationButton href="https://cocoindex.io/docs/custom_ops/custom_targets#target-connector" text="Target Connector" margin="0 0 16px 0" />
78
+
81
79
  `get_persistent_key()` defines the persistent key,
82
80
  which uniquely identifies the target for change tracking and incremental updates. Here, we simply use the target directory as the key (e.g., `./data/output`).
83
81
 
@@ -180,17 +178,15 @@ def mutate(
180
178
  ### Use it in the Flow
181
179
 
182
180
  ```python
183
- output_html.export(
184
- "OutputHtml",
185
- LocalFileTarget(directory="output_html"),
186
- primary_key_fields=["filename"],
187
- )
181
+ output_html.export(
182
+ "OutputHtml",
183
+ LocalFileTarget(directory="output_html"),
184
+ primary_key_fields=["filename"],
185
+ )
188
186
  ```
189
187
 
190
188
  ## Run the example
191
189
 
192
- Once your pipeline is set up, keeping your knowledge graph updated is simple:
193
-
194
190
  ```bash
195
191
  pip install -e .
196
192
  cocoindex update --setup main.py
@@ -5,35 +5,45 @@ sidebar_class_name: hidden
5
5
  slug: /examples/knowledge-graph-for-docs
6
6
  canonicalUrl: '/examples/knowledge-graph-for-docs'
7
7
  sidebar_custom_props:
8
- image: /img/examples/docs_to_knowledge_graph.png
8
+ image: /img/examples/docs_to_knowledge_graph/cover.png
9
9
  tags: [knowledge-graph, structured-data-extraction]
10
10
  tags: [knowledge-graph, structured-data-extraction]
11
11
  ---
12
12
 
13
- import { GitHubButton, YouTubeButton } from '../../../src/components/GitHubButton';
13
+ import { GitHubButton, YouTubeButton, DocumentationButton } from '../../../src/components/GitHubButton';
14
14
 
15
15
  <GitHubButton url="https://github.com/cocoindex-io/cocoindex/tree/main/examples/docs_to_knowledge_graph"/>
16
16
  <YouTubeButton url="https://youtu.be/2KVkpUGRtnk?si=MRalDweWrid-IFje" />
17
17
 
18
-
19
18
  ## Overview
20
- We will generate two kinds of relationships:
21
-
19
+ [CocoIndex](https://github.com/cocoindex-io/cocoindex) makes it easy to build and maintain knowledge graphs with continuous source updates. In this tutorial, we will use LLM to extract relationships between the concepts in each document, and generate two kinds of relationships:
22
20
  1. Relationships between subjects and objects. E.g., "CocoIndex supports Incremental Processing"
23
21
  2. Mentions of entities in a document. E.g., "core/basics.mdx" mentions `CocoIndex` and `Incremental Processing`.
24
22
 
23
+ and then build a knowledge graph.
24
+
25
+ ![Relationship between subjects and objects](/img/examples/docs_to_knowledge_graph/relationship.png)
26
+
27
+
28
+ ## Flow Overview
29
+ ![Flow overview](/img/examples/docs_to_knowledge_graph/flow.png)
30
+ - Add documents as source.
31
+ - For each document, extract the title and summary, and collects to `Document` nodes.
32
+ - For each document, use LLM to extract relationships — `subject`, `predicate`, `object`, and collect different kinds of relationships.
33
+ - CocoIndex can direct map the collected data to Neo4j nodes and relationships.
34
+
25
35
  ## Setup
26
36
  * [Install PostgreSQL](https://cocoindex.io/docs/getting_started/installation#-install-postgres). CocoIndex uses PostgreSQL internally for incremental processing.
27
- * [Install Neo4j](https://cocoindex.io/docs/ops/storages#Neo4j), a graph database.
28
- * [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai). Alternatively, you can switch to Ollama, which runs LLM models locally - [guide](https://cocoindex.io/docs/ai/llm#ollama).
37
+ * [Install Neo4j](https://cocoindex.io/docs/ops/targets#neo4j-dev-instance), a graph database.
38
+ * [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai). Alternatively, you can switch to Ollama, which runs LLM models locally.
39
+ <DocumentationButton href="https://cocoindex.io/docs/ai/llm#ollama" text="Ollama" margin="0 0 16px 0" />
29
40
 
30
41
  ## Documentation
31
- You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/storages#property-graph-targets).
42
+ <DocumentationButton href="https://cocoindex.io/docs/ops/targets#property-graph-targets" text="Property Graph Targets" margin="0 0 16px 0" />
32
43
 
33
44
 
34
45
  ## Data flow to build knowledge graph
35
46
 
36
-
37
47
  ### Add documents as source
38
48
 
39
49
  We will process CocoIndex documentation markdown files (`.md`, `.mdx`) from the `docs/core` directory ([markdown files](https://github.com/cocoindex-io/cocoindex/tree/main/docs/docs/core), [deployed docs](https://cocoindex.io/docs/core/basics)).
@@ -49,6 +59,8 @@ def docs_to_kg_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoindex.D
49
59
  Here `flow_builder.add_source` creates a [KTable](https://cocoindex.io/docs/core/data_types#KTable).
50
60
  `filename` is the key of the KTable.
51
61
 
62
+ <DocumentationButton href="https://cocoindex.io/docs/ops/sources" text="Sources" margin="0 0 16px 0" />
63
+
52
64
 
53
65
  ### Add data collectors
54
66
 
@@ -92,7 +104,7 @@ with data_scope["documents"].row() as doc:
92
104
 
93
105
  `doc["summary"]` adds a new column to the KTable `data_scope["documents"]`.
94
106
 
95
-
107
+ ![Document summary](/img/examples/docs_to_knowledge_graph/summary.png)
96
108
 
97
109
  ### Extract relationships from the document using LLM
98
110
 
@@ -138,6 +150,7 @@ doc["relationships"] = doc["content"].transform(
138
150
 
139
151
  `doc["relationships"]` adds a new field `relationships` to each document. `output_type=list[Relationship]` specifies that the output of the transformation is a [LTable](https://cocoindex.io/docs/core/data_types#LTable).
140
152
 
153
+ ![Extract Relationships](/img/examples/docs_to_knowledge_graph/extract_relationship.png)
141
154
 
142
155
  ### Collect relationships
143
156
 
@@ -160,7 +173,6 @@ with doc["relationships"].row() as relationship:
160
173
  id=cocoindex.GeneratedField.UUID, entity=relationship["object"],
161
174
  filename=doc["filename"],
162
175
  )
163
-
164
176
  ```
165
177
 
166
178
  - `entity_relationship` collects relationships between subjects and objects.
@@ -178,6 +190,7 @@ All nodes for Neo4j need two things:
178
190
 
179
191
  CocoIndex uses the primary key field to match the nodes and deduplicate them. If you have multiple nodes with the same primary key, CocoIndex keeps only one of them.
180
192
 
193
+ ![Deduplication](/img/examples/docs_to_knowledge_graph/dedupe.png)
181
194
 
182
195
  There are two ways to map nodes:
183
196
  1. When you have a collector just for the node, you can directly export it to Neo4j.
@@ -198,6 +211,7 @@ conn_spec = cocoindex.add_auth_entry(
198
211
 
199
212
  #### Export `Document` nodes to Neo4j
200
213
 
214
+ ![Document nodes](/img/examples/docs_to_knowledge_graph/export_document.png)
201
215
 
202
216
  ```python
203
217
  document_node.export(
@@ -214,6 +228,7 @@ This exports Neo4j nodes with label `Document` from the `document_node` collecto
214
228
  - It carries all the fields from `document_node` collector to Neo4j nodes with label `Document`.
215
229
 
216
230
 
231
+
217
232
  #### Export `RELATIONSHIP` and `Entity` nodes to Neo4j
218
233
 
219
234
  We don't have explicit collector for `Entity` nodes.
@@ -233,6 +248,8 @@ flow_builder.declare(
233
248
 
234
249
  Next, export the `entity_relationship` to Neo4j.
235
250
 
251
+ ![Export relationship](/img/examples/docs_to_knowledge_graph/export_relationship.png)
252
+
236
253
  ```python
237
254
  entity_relationship.export(
238
255
  "entity_relationship",
@@ -258,7 +275,6 @@ entity_relationship.export(
258
275
  ),
259
276
  primary_key_fields=["id"],
260
277
  )
261
- )
262
278
  ```
263
279
 
264
280
  The `cocoindex.storages.Relationships` declares how to map relationships in Neo4j.
@@ -272,6 +288,7 @@ Note that different relationships may share the same source and target nodes.
272
288
 
273
289
  #### Export the `entity_mention` to Neo4j.
274
290
 
291
+ ![Export Entity Mention](/img/examples/docs_to_knowledge_graph/relationship.png)
275
292
 
276
293
  ```python
277
294
  entity_mention.export(
@@ -302,8 +319,6 @@ It creates relationships by:
302
319
 
303
320
 
304
321
  ## Query and test your index
305
- 🎉 Now you are all set!
306
-
307
322
  1. Install the dependencies:
308
323
 
309
324
  ```sh
@@ -315,23 +330,24 @@ It creates relationships by:
315
330
  cocoindex update --setup main.py
316
331
  ```
317
332
 
318
- You'll see the index updates state in the terminal. For example, you'll see the following output:
333
+ You'll see the index updates state in the terminal. For example,
319
334
 
320
335
  ```
321
336
  documents: 7 added, 0 removed, 0 updated
322
337
  ```
323
338
 
324
- 3. (Optional) I used CocoInsight to troubleshoot the index generation and understand the data lineage of the pipeline.
325
- It is in free beta now, you can give it a try. Run following command to start CocoInsight:
339
+ ## CocoInsight
326
340
 
327
- ```sh
328
- cocoindex server -ci main.py
329
- ```
341
+ I used CocoInsight to troubleshoot the index generation and understand the data lineage of the pipeline. It is in free beta now, you can give it a try.
330
342
 
331
- And then open the url https://cocoindex.io/cocoinsight. It just connects to your local CocoIndex server, with Zero pipeline data retention.
343
+ ```sh
344
+ cocoindex server -ci main.py
345
+ ```
332
346
 
347
+ And then open the url `https://cocoindex.io/cocoinsight`. It just connects to your local CocoIndex server, with zero pipeline data retention.
333
348
 
334
- ### Browse the knowledge graph
349
+
350
+ ## Browse the knowledge graph
335
351
  After the knowledge graph is built, you can explore the knowledge graph you built in Neo4j Browser.
336
352
 
337
353
  For the dev environment, you can connect to Neo4j browser using credentials:
@@ -345,11 +361,29 @@ You can open it at [http://localhost:7474](http://localhost:7474), and run the f
345
361
  MATCH p=()-->() RETURN p
346
362
  ```
347
363
 
364
+ ## Kuzu
365
+ Cocoindex natively supports Kuzu - a high performant, embedded open source graph database.
366
+
367
+ <DocumentationButton href="https://cocoindex.io/docs/ops/targets#kuzu" text="Kuzu" margin="0 0 16px 0" />
348
368
 
369
+ The GraphDB interface in CocoIndex is standardized, you just need to **switch the configuration** without any additional code changes. CocoIndex supports exporting to Kuzu through its API server. You can bring up a Kuzu API server locally by running:
349
370
 
350
- ## Support us
351
- We are constantly improving, and more features and examples are coming soon.
352
- If you love this article, please give us a star ⭐ at [GitHub repo](https://github.com/cocoindex-io/cocoindex) to help us grow.
371
+ ``` sh
372
+ KUZU_DB_DIR=$HOME/.kuzudb
373
+ KUZU_PORT=8123
374
+ docker run -d --name kuzu -p ${KUZU_PORT}:8000 -v ${KUZU_DB_DIR}:/database kuzudb/api-server:latest
375
+ ```
376
+
377
+ In your CocoIndex flow, you need to add the Kuzu connection spec to your flow.
378
+
379
+ ```python
380
+ kuzu_conn_spec = cocoindex.add_auth_entry(
381
+ "KuzuConnection",
382
+ cocoindex.storages.KuzuConnection(
383
+ api_server_url="http://localhost:8123",
384
+ ),
385
+ )
386
+ ```
353
387
 
354
- Thanks for reading!
388
+ <GitHubButton url="https://github.com/cocoindex-io/cocoindex/blob/30761f8ab674903d742c8ab2e18d4c588df6d46f/examples/docs_to_knowledge_graph/main.py#L33-L37" margin="0 0 16px 0" />
355
389
 
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/image_search
6
6
  canonicalUrl: '/examples/image_search'
7
7
  sidebar_custom_props:
8
- image: /img/examples/image_search.png
8
+ image: /img/examples/image_search/cover.png
9
9
  tags: [vector-index, multi-modal]
10
10
  tags: [vector-index, multi-modal]
11
11
  ---
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/manual_extraction
6
6
  canonicalUrl: '/examples/manual_extraction'
7
7
  sidebar_custom_props:
8
- image: /img/examples/manual_extraction.png
8
+ image: /img/examples/manual_extraction/cover.png
9
9
  tags: [structured-data-extraction, data-mapping]
10
10
  tags: [structured-data-extraction, data-mapping]
11
11
  ---
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/multi_format_index
6
6
  canonicalUrl: '/examples/multi_format_index'
7
7
  sidebar_custom_props:
8
- image: /img/examples/multi_format_index.png
8
+ image: /img/examples/multi_format_index/cover.png
9
9
  tags: [vector-index, multi-modal]
10
10
  tags: [vector-index, multi-modal]
11
11
  ---
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/patient_form_extraction
6
6
  canonicalUrl: '/examples/patient_form_extraction'
7
7
  sidebar_custom_props:
8
- image: /img/examples/patient_form_extraction.png
8
+ image: /img/examples/patient_form_extraction/cover.png
9
9
  tags: [structured-data-extraction, data-mapping ]
10
10
  tags: [structured-data-extraction, data-mapping]
11
11
  ---
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/photo_search
6
6
  canonicalUrl: '/examples/photo_search'
7
7
  sidebar_custom_props:
8
- image: /img/examples/photo_search.png
8
+ image: /img/examples/photo_search/cover.png
9
9
  tags: [vector-index, multi-modal]
10
10
  tags: [vector-index, multi-modal]
11
11
  ---
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/product_recommendation
6
6
  canonicalUrl: '/examples/product_recommendation'
7
7
  sidebar_custom_props:
8
- image: /img/examples/product_recommendation.png
8
+ image: /img/examples/product_recommendation/cover.png
9
9
  tags: [knowledge-graph ]
10
10
  tags: [knowledge-graph]
11
11
  ---
@@ -5,7 +5,7 @@ sidebar_class_name: hidden
5
5
  slug: /examples/simple_vector_index
6
6
  canonicalUrl: '/examples/simple_vector_index'
7
7
  sidebar_custom_props:
8
- image: /img/examples/simple_vector_index.png
8
+ image: /img/examples/simple_vector_index/cover.png
9
9
  tags: [vector-index]
10
10
  tags: [vector-index]
11
11
  ---