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

[Bug]: Search output a non-existed field behaves differently when dynamicField is enabled or not #28465

Closed
1 task done
ThreadDao opened this issue Nov 15, 2023 · 8 comments
Closed
1 task done
Assignees
Labels
kind/bug Issues or changes related a bug severity/critical Critical, lead to crash, data missing, wrong result, function totally doesn't work. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@ThreadDao
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: master-20231115-0b905078
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2): 
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

1.If enable dynamic field and insert data, search output a non-existed field successfully, and return {} entity
["['id: 1207, distance: 0.8480451703071594, entity: {}', 'id: 141, distance: 0.8437869548797607, entity: {}', 'id: 202,...
2. If disable dynamic field, search output a non-existed gets a error: <MilvusException: (code=65535, message=field int63 not exist)>

The behavior should be consistent regardless of whether dynamicField is enabled.

Expected Behavior

No response

Steps To Reproduce

@pytest.mark.tags(CaseLabel.L2)
    @pytest.mark.parametrize("enable_dynamic", [True])
    def test_search_with_output_fields_not_exist(self, enable_dynamic):
        """
        target: test search with output fields
        method: search with non-exist output_field
        expected: raise exception
        """
        # 1. initialize with data
        collection_w = self.init_collection_general(prefix, insert_data=True, enable_dynamic_field=enable_dynamic)[0]
        # 2. search
        log.info("test_search_with_output_fields_not_exist: Searching collection %s" %
                 collection_w.name)
        collection_w.search(vectors[:default_nq], default_search_field,
                            default_search_params, default_limit,
                            default_search_exp, output_fields=["int63"],
                            check_task=CheckTasks.err_res,
                            check_items={ct.err_code: 65535,
                                         ct.err_msg: "field int63 not exist"})

Milvus Log

No response

Anything else?

No response

@ThreadDao ThreadDao added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 15, 2023
@ThreadDao
Copy link
Contributor Author

when output_fields=[""]

  1. if enable dynamic, error error: parse output field name failed:
  2. if not enable dynamic field, error field not exist

@ThreadDao
Copy link
Contributor Author

ThreadDao commented Nov 15, 2023

@NicoYuan1986 Please add some relevant cases in CI

@yanliang567
Copy link
Contributor

/assign @jiaoew1991
/unassign

@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 15, 2023
@jiaoew1991
Copy link
Contributor

/assign @yah01
/unassign

@sre-ci-robot sre-ci-robot assigned yah01 and unassigned jiaoew1991 Nov 16, 2023
@ThreadDao ThreadDao added the severity/critical Critical, lead to crash, data missing, wrong result, function totally doesn't work. label Nov 17, 2023
sre-ci-robot pushed a commit that referenced this issue Nov 29, 2023
1. modify test cases about output a non-existed field. issue: #28465
2. add cases about creating collection using different language
3. add test case about inserting a string value to a pk(int64) field
4. add test case about search with expression using double quotes.
issue: #28365

Signed-off-by: nico <cheng.yuan@zilliz.com>
@yah01
Copy link
Member

yah01 commented Dec 12, 2023

when output_fields=[""]

  1. if enable dynamic, error error: parse output field name failed:
  2. if not enable dynamic field, error field not exist

this may be expected as we don't require the inserted JSON data to follow the field name rule, an empty string could also be a valid JSON key

@yah01
Copy link
Member

yah01 commented Dec 12, 2023

/assign @ThreadDao

Copy link

stale bot commented Jan 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@stale stale bot added the stale indicates no udpates for 30 days label Jan 11, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.4, 2.3.5 Jan 12, 2024
@stale stale bot removed the stale indicates no udpates for 30 days label Jan 12, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.5, 2.3.6 Jan 22, 2024
@yanliang567 yanliang567 removed this from the 2.3.6 milestone Jan 30, 2024
@yanliang567 yanliang567 added this to the 2.3.7 milestone Jan 30, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.7, 2.3.9, 2.3.10 Feb 18, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.10, 2.3.11 Feb 28, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.11, 2.3.12 Mar 11, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.12, 2.3.13 Mar 22, 2024
@ThreadDao
Copy link
Contributor Author

image: master-20240322-c27db43b-amd64 and 2.4-20240321-6afbc8a6-amd64
Now in the test case, different assertions are made for enabling and disabling dynamic columns for non-existent column names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug severity/critical Critical, lead to crash, data missing, wrong result, function totally doesn't work. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants