Skip to content
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

feat: support json index #36750

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

feat: support json index #36750

wants to merge 10 commits into from

Commits on Nov 7, 2024

  1. feat: support json index

    This PR adds json index support for json and dynamic fields. Now you can only do unary query like 'a["b"] > 1' using this index. We will support more filter type later.
    
    basic usage:
    ```
    collection.create_index("json_field", {"index_type": "INVERTED",
        "params": {"json_cast_type": DataType.STRING, "json_path":
    'json_field["a"]["b"]'}})
    ```
    
    There are some limits to use this index:
    1. If a record does not have the json path you specify, it will be ignored and there will not be an error.
    2. If a value of the json path fails to be cast to the type you specify,  it will be ignored and there will not be an error.
    3. A specific json path can have only one json index.
    4. If you try to create more than one json indexes for one json field, sdk(pymilvus<=2.4.7) may return immediately because of internal implementation. This will be fixed in a later version.
    
    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ea427d3 View commit details
    Browse the repository at this point in the history
  2. fix

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    a4360b2 View commit details
    Browse the repository at this point in the history
  3. fix

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    1ba0549 View commit details
    Browse the repository at this point in the history
  4. fix

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    805df78 View commit details
    Browse the repository at this point in the history
  5. fix

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    d2aea02 View commit details
    Browse the repository at this point in the history
  6. fix code checker

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    0ffb51c View commit details
    Browse the repository at this point in the history
  7. fix

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ac0d4ce View commit details
    Browse the repository at this point in the history
  8. fix test

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    0cadfb0 View commit details
    Browse the repository at this point in the history
  9. skip some go client tests

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    a857eda View commit details
    Browse the repository at this point in the history
  10. fix ut

    Signed-off-by: sunby <[email protected]>
    sunby committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    b6add46 View commit details
    Browse the repository at this point in the history