Files
momentry_core/scripts/test_visual_search_basic.sh
Accusys 63fbbe1225 release: v1.3.1 - Pipeline Queue Integration, OCR Fix, Worker Compatibility
Major Changes:
- Pipeline Queue integration completed (internal.file + pipeline.commands)
- Fixed old job_worker database compatibility with new command_queue table
- Compiled Swift OCR binary (was missing, causing empty OCR results)
- Added deep scan functionality through re-scan API

Fixes:
- Changed CommandJob.id from i32 to i64 for database compatibility
- Added UUID generation in create_command (message_id field)
- Fixed claim_pending_commands to query queue_name = 'internal.file'
- Fixed field mappings: command_id → message_id, job_type → command_type
- Added support for 'processing' status in CommandJobStatus

Queue System:
- internal.file queue: for register/unregister/re-scan commands (job_worker)
- pipeline.commands queue: for vectorize/store_asrx/etc commands (pipeline_worker)

Documentation:
- Added comprehensive queue system documentation
- Created M4 workspace status reports
- Updated AGENTS.md with queue system details
2026-10-12 10:00:51 +08:00

62 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# Visual Search 基础功能测试
# 使用现有的 SmartSearch API
set -e
API_URL="http://localhost:3002"
API_KEY="muser_demo_key_32chars_abcdef1234567890"
echo "========================================="
echo " Visual Search 基础功能测试"
echo "========================================="
echo -e "\n[测试 1] 语义搜索: people talking"
curl -s -X POST "$API_URL/api/v1/smart-search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"query": "people talking",
"limit": 5
}' | jq '.results | length'
echo -e "\n[测试 2] 场景搜索: outdoor scene"
curl -s -X POST "$API_URL/api/v1/smart-search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"query": "outdoor scene",
"limit": 5
}' | jq '.results | length'
echo -e "\n[测试 3] VLM 描述搜索: sunset"
curl -s -X POST "$API_URL/api/v1/smart-search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"query": "sunset",
"limit": 5
}' | jq '.results | length'
echo -e "\n[测试 4] 人物搜索: person"
curl -s -X POST "$API_URL/api/v1/smart-search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"query": "person",
"limit": 5
}' | jq '.results | length'
echo -e "\n[测试 5] 详细结果示例"
curl -s -X POST "$API_URL/api/v1/smart-search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"query": "meeting room",
"limit": 3
}' | jq '.results[0] | {file_uuid, start_time, end_time, summary}'
echo -e "\n========================================="
echo " 测试完成"
echo "========================================="