Skip to content

Conversation

@Benjamindaoson
Copy link


## Description

This PR introduces a complete, minimal, and production-aligned ingestion pipeline script (main.py) to the bootcamp/ingestion_pipeline/ directory.
While the current bootcamp examples provide conceptual guidance through Jupyter notebooks, the repository lacks a fully executable Python entry point that demonstrates how a real application would interact with Milvus: encode → insert → query → interpret.

This PR addresses that gap by implementing a self-contained script that:

  1. Connects to Milvus using the recommended client pattern,
  2. Ensures the target collection exists and is correctly loaded,
  3. Encodes documents using the existing TextEncoder,
  4. Inserts vectors via the canonical MilvusClient wrapper, and
  5. Executes semantic search with correct result iteration over the returned hit structure.

This contribution helps future developers, new adopters, and integrators understand Milvus ingestion workflows without relying solely on notebooks, and it provides a foundation for automated ingestion examples or future CI tests.

Changes

  • Feature added: Introduced main.py, a minimal ingestion pipeline example demonstrating end-to-end usage (encode → insert → search).
  • Other: Demonstrated correct iteration over Milvus search results, addressing a common beginner pitfall and improving code clarity for new contributors.
  • Bug fixed: N/A
  • Refactor: N/A

How to Test

  1. Ensure Milvus (Milvus Lite or distributed) is running.

  2. Activate the environment with PyMilvus installed.

  3. Navigate to:

    cd bootcamp/ingestion_pipeline
  4. Run:

    python main.py
  5. Expected behavior:

    • Successful connection to Milvus
    • Confirmation of the text_rag collection
    • Vectors inserted and IDs returned
    • Search results printed with correct ID and distance formatting

All steps were executed and validated locally before this PR.

Checklist

  • Code compiles and runs without errors
  • Linting and formatting pass
  • Documentation and inline comments added where helpful
  • Rebased and aligned with the latest main
  • No extraneous files or noise added

Commit Hygiene

  • Commit kept small, focused, and clearly named
  • No unnecessary changes beyond the scope of this PR
  • Code placed in the correct directory following existing repository structure
  • Maintains consistency with the broader Bootcamp coding style

Reviewer Notes

  • This PR intentionally keeps the example minimal but canonical, serving as a practical reference for users who prefer a script-based workflow over notebooks.
  • The ingestion logic is isolated and can be easily expanded in future PRs (e.g., batching, streaming ingestion, error handling, validations).
  • Maintainers may consider linking this script in onboarding materials or extending it into a template for additional ingestion examples.

Related Issues, PRs, or Docs

  • None identified.
  • This PR can optionally serve as a basis for future documentation enhancements or example coverage improvements.

@sre-ci-robot
Copy link
Collaborator

Welcome @Benjamindaoson! It looks like this is your first PR to milvus-io/bootcamp 🎉

@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Benjamindaoson

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Benjamindaoson
Copy link
Author

Thanks for reviewing this PR.

This change adds a minimal, script-based ingestion example to complement the existing notebook-only tutorials. Several Milvus beginners and adopters often seek a complete “encode → insert → search → iterate results” workflow that can run directly from a Python entry point. This PR provides that missing reference.

The example follows the recommended client patterns, uses a clean separation between encoding and Milvus client operations, and demonstrates correct result iteration on search hits — something that is easy for new users to misunderstand when moving from notebooks to application code.

If there are preferred conventions, naming guidelines, or structural adjustments that the project would like contributors to follow, I am happy to align with the maintainers’ standards in future contributions.

Thank you for maintaining this project — I appreciate your time.

@Benjamindaoson
Copy link
Author

Benjamindaoson commented Nov 20, 2025

Hi team, just a gentle follow-up.
When you have a moment, could you help approve the workflow so CI can run?
No rush at all — happy to align with any conventions or adjustments needed.
Appreciate your time and maintenance of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants