By default, Hippo performs segment auto-compaction automatically. Users can enable/disable it via below command.
curl -u shiva:shiva -XPOST 'localhost:8902/hippo/v1/{table}/_embedding_index_auto_compaction?database_name={database_name}&pretty' -H 'Content-Type: application/json' -d'{
"index_name" : "pq_index",
"enable_auto_compaction" : true,
"wait_for_completion" : true,
"timeout" : "2m"
}';
Result:
{
"job_id" : "737e8f256f7141c69d4871bab51fadb6",
"job_status" : "SHIVA_JOB_SUCCESS",
"task_results" : [
{
"id" : "a6ea4f51db754485b0c1bcba54f201ab",
"status" : "TASK_SUCCESS",
"server" : "tw-node48:8702",
"execute_time" : 0.0
}
]
}
Parameter description:
Parameters | Description | Required |
---|---|---|
table | Table name, such as "book" created in this example | Yes |
database_name | Database where the table is located | No, defaults to "default" database |
enable_auto_compaction | Enable/disable auto-compaction | Yes |
index_name | Vector index name | Yes |
wait_for_completion | Whether to wait until the job is done | Yes |
timeout | Operation timeout | If "wait_for_completion" is set to true, timeout parameter is required |