Skip to content

[Bug]: https://milvus.io/docs/zh/use-json-fields.md 文档有误,并且pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=INVERTED are not supported on JSON field: invalid parameter[expected=valid index params][actual=invalid index params])> #2710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
deku0818 opened this issue Mar 27, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@deku0818
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

文档中

**index_params = client.prepare_index_params()**

index_params.add_index(
    field_name="metadata",
    index_type="INVERTED",
    index_name="json_index_1",
    params={
        "json_path": "metadata[\"product_info\"][\"category\"]",
        "json_cast_type": "varchar"
    }
)

index_params.add_index(
    field_name="metadata",
    index_type="INVERTED",
    index_name="json_index_2",
    params={
        "json_path": "metadata[\"price\"]",
        "json_cast_type": "double"
    }
)

**index_params = client.prepare_index_params()**

index_params.add_index(
    field_name="embedding",
    index_name="vector_index",
    index_type="AUTOINDEX",  # Use automatic indexing to simplify complex index settings
    metric_type="COSINE"  # Specify similarity metric type, options include L2, COSINE, or IP
)

这里index_params = client.prepare_index_params() 定义了两次,之前定义JSON INDEX 被重新初始化了,这里只有一个embedding 的 AUTOINDEX
并且如果 去掉多余的index_params = client.prepare_index_params() ,执行会报错pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=INVERTED are not supported on JSON field: invalid parameter[expected=valid index params][actual=invalid index params])>

Expected Behavior

No response

Steps/Code To Reproduce behavior

Environment details

- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0):
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

@deku0818 deku0818 added the kind/bug Something isn't working label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant