(name)
| 62 | |
| 63 | |
| 64 | def create_explicit_index(name): |
| 65 | url = f"{client.base_url}/collections/{name}/indexes/usv" |
| 66 | data = {"name": name, "quantization": 64, "sample_threshold": 1000} |
| 67 | response = requests.post(url, headers=client._get_headers(), data=json.dumps(data), verify=client.verify_ssl) |
| 68 | if response.status_code not in [200, 201]: |
| 69 | raise Exception(f"Failed to create USV index: {response.text}") |
| 70 | |
| 71 | |
| 72 | def create_transaction(name): |