Add support for outputting simprints in a format compatible with the search API schema.
Current behavior:
- Simprints use
maintype, subtype, version fields
- Features organized in
FeatureSet with Index-Format or Object-Format
Required changes:
- Add
to_api_format() method to convert metadata to API-compatible structure
- Organize simprints by type key (e.g.,
SEMANTIC_TEXT_V0) instead of using separate maintype/subtype/version fields
- Keep all existing fields including optional
content, offset, size
Target API Schema:
{
"simprints": {
"SEMANTIC_TEXT_V0": [
{
"simprint": "XZjeSfdyVi0",
"offset": 0,
"size": 512,
"content": "optional text chunk"
}
]
}
}
Implementation Notes:
- Add
to_api_format() method similar to existing to_index_format() and to_object_format()
- Consider adding CLI flag (e.g.,
--api-format) to output in this format
- Type key format:
{MAINTYPE}_{SUBTYPE}_V{version} (e.g., SEMANTIC_TEXT_V0)
Add support for outputting simprints in a format compatible with the search API schema.
Current behavior:
maintype,subtype,versionfieldsFeatureSetwith Index-Format or Object-FormatRequired changes:
to_api_format()method to convert metadata to API-compatible structureSEMANTIC_TEXT_V0) instead of using separatemaintype/subtype/versionfieldscontent,offset,sizeTarget API Schema:
{ "simprints": { "SEMANTIC_TEXT_V0": [ { "simprint": "XZjeSfdyVi0", "offset": 0, "size": 512, "content": "optional text chunk" } ] } }Implementation Notes:
to_api_format()method similar to existingto_index_format()andto_object_format()--api-format) to output in this format{MAINTYPE}_{SUBTYPE}_V{version}(e.g.,SEMANTIC_TEXT_V0)