63fbbe1225
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
67 lines
2.1 KiB
Bash
Executable File
67 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Visual Search 基础功能测试
|
|
# 使用现有的 Smart Search 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/search/smart" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-d '{
|
|
"query": "people talking",
|
|
"limit": 5
|
|
}' | jq '{total: .results | length, first_result: .results[0].file_uuid}'
|
|
|
|
echo -e "\n[测试 2] 场景搜索: outdoor"
|
|
curl -s -X POST "$API_URL/api/v1/search/smart" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-d '{
|
|
"query": "outdoor",
|
|
"limit": 5
|
|
}' | jq '{total: .results | length, first_result: .results[0].file_uuid}'
|
|
|
|
echo -e "\n[测试 3] VLM 描述搜索: sunset"
|
|
curl -s -X POST "$API_URL/api/v1/search/smart" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-d '{
|
|
"query": "sunset",
|
|
"limit": 5
|
|
}' | jq '{total: .results | length, first_result: .results[0].file_uuid}'
|
|
|
|
echo -e "\n[测试 4] 人物相关: person"
|
|
curl -s -X POST "$API_URL/api/v1/search/smart" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-d '{
|
|
"query": "person",
|
|
"limit": 5
|
|
}' | jq '{total: .results | length, first_result: .results[0].file_uuid}'
|
|
|
|
echo -e "\n[测试 5] 详细结果示例"
|
|
curl -s -X POST "$API_URL/api/v1/search/smart" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-d '{
|
|
"query": "meeting",
|
|
"limit": 1
|
|
}' | jq '.results[0] | {file_uuid, file_name, start_time, end_time, summary, similarity}'
|
|
|
|
echo -e "\n========================================="
|
|
echo " 测试完成"
|
|
echo "========================================="
|
|
|
|
echo -e "\n✅ 测试成功!"
|
|
echo " - Smart Search API 正常工作"
|
|
echo " - 可以进行语义和关键词搜索"
|
|
echo " - 返回结果包含视频片段和时间信息" |