class_docstr: Test case of action before reinstall 
class_docstr_tok: ["Test","case","of","action","before","reinstall"]
docstr: before reinstall: create collection and insert data, load and search
  after reinstall: get collection, load, search, create index, load, and search
          
docstr_tok: ["before","reinstall",":","create","collection","and","insert","data",",","load","and","search","after","reinstall",":","get","collection",",","load",",","search",",","create","index",",","load",",","and","search"]
code: def test_task_1(self, index_type, data_size):
      """
      before reinstall: create collection and insert data, load and search
      after reinstall: get collection, load, search, create index, load, and search
      """
      name = "task_1_" + index_type
      insert_data = True
      is_binary = True if "BIN" in index_type else False
      is_flush = False
      collection_w = self.init_collection_general(
          insert_data=insert_data,
          is_binary=is_binary,
          nb=data_size,
          is_flush=is_flush,
          name=name,
      )[0]
      collection_w.load()
  
      if is_binary:
          _, vectors_to_search = cf.gen_binary_vectors(
              default_nb, default_dim
          )
          default_search_field = ct.default_binary_vec_field_name
      else:
          vectors_to_search = cf.gen_vectors(default_nb, default_dim)
          default_search_field = ct.default_float_vec_field_name
      search_params = gen_search_param(index_type)[0]
      collection_w.search(
          vectors_to_search[:default_nq],
          default_search_field,
          search_params,
          default_limit,
          default_search_exp,
          check_task=CheckTasks.check_search_results,
          check_items={"nq": default_nq, "limit": default_limit},
      )
      output_fields = [ct.default_int64_field_name]
      collection_w.query(
          default_term_expr,
          output_fields=output_fields,
          check_task=CheckTasks.check_query_not_empty,
      )
  
file_path: milvus/tests/python_client/deploy/testcases/test_action_before_reinstall.py
imports: import pytest
  from common import common_func
  from common import common_type
  from common.common_type import CaseLabel, CheckTasks
  from utils.util_pymilvus import *
  from deploy.base import TestDeployBase
  from deploy import common
  from deploy.common import gen_index_param, gen_search_param
label_desc: Use image node_id 2 for calling the TestActionBeforeReinstall obj's underlying member method code with example usage: obj.test_task_1(index_type, data_size) without return types