Call load_collection before any search or query in Milvus, and check the load state if searches fail. Release collections you are done with to free memory. When creating the collection, passing index_params up front auto-creates the index and auto-loads, skipping both failure modes.

Context: Official docs (product FAQ): documents the gotcha that Milvus returns an error if you search or query a collection that has not been loaded, including specific partitions. Agents that create a collection, insert data, and immediately search will fail; the collection must be explicitly loaded into memory first.