Add MOL data type design document - #30
Conversation
Introduce design doc for the MOL (Molecule) data type in Milvus, covering molecular storage (SMILES/pickle dual representation), RDKit CGO integration, MOL_CONTAINS substructure/superstructure expression, MOL_PATTERN index, MolFingerprint function, and bulk import support. Signed-off-by: xiejh <862103595@qq.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 862103595 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @862103595! It looks like this is your first PR to milvus-io/milvus-design-docs 🎉 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a049ae7b72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| **pymilvus usage:** | ||
|
|
||
| ```python | ||
| from pymilvus import MilvusClient, DataType |
There was a problem hiding this comment.
Import FunctionType in the runnable Python example
The example imports only MilvusClient and DataType, but later calls function_type=FunctionType.MolFingerprint; copy-pasting this snippet will raise NameError: name 'FunctionType' is not defined before collection creation. Adding FunctionType to the import is necessary for the documented setup flow to run as written.
Useful? React with 👍 / 👎.
| ▼ | ||
| Proxy: checkMOLFieldData() | ||
| - Validates each SMILES via ConvertSMILESToPickle() | ||
| - Replaces MolSmilesData with MolData (pickle bytes) in-place |
There was a problem hiding this comment.
Keep insert-flow data source consistent for fingerprinting
The insert flow says checkMOLFieldData() replaces MolSmilesData with pickle MolData in place, but the later MolFingerprint section says insert fingerprint generation reads from MolSmilesData; these statements are mutually exclusive. If the flow is followed literally, ProcessInsert() loses its documented input when fingerprint functions are enabled, so the document should align on one source (or explicitly describe preservation/conversion steps).
Useful? React with 👍 / 👎.
Summary
Design document for the new MOL (Molecule) data type in Milvus, enabling native cheminformatics support.
Key features covered:
DataType.Mol = 27): SMILES input / RDKit binary pickle storage (dual representation)FunctionType.MolFingerprint = 5): Auto-generate Morgan/MACCS/RDKit fingerprints as BinaryVector for similarity searchRelated Work
This design has been implemented across the following PRs in milvus-io/milvus: