{"record":{"id":"a502088590ec43d7","repo":"microsoft/semantic-kernel","slug":"get-without-keys-is-not-yet-implemented-a50208","errorCode":null,"errorMessage":"Get without keys is not yet implemented.","messagePattern":"Get without keys is not yet implemented\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/connectors/mongodb.py","lineNumber":286,"sourceCode":"                ReplaceOne(\n                    filter={MONGODB_ID_FIELD: record[MONGODB_ID_FIELD]},\n                    replacement=record,\n                    upsert=True,\n                )\n            )\n        result = await self._get_collection().bulk_write(operations, ordered=False)\n        return [str(value) for _, value in result.upserted_ids.items()]  # type: ignore\n\n    @override\n    async def _inner_get(\n        self,\n        keys: Sequence[TKey] | None = None,\n        options: GetFilteredRecordOptions | None = None,\n        **kwargs: Any,\n    ) -> Sequence[dict[str, Any]] | None:\n        if not keys:\n            if options is not None:\n                raise NotImplementedError(\"Get without keys is not yet implemented.\")\n            return None\n        result = self._get_collection().find({MONGODB_ID_FIELD: {\"$in\": keys}})\n        return await result.to_list(length=len(keys))\n\n    @override\n    async def _inner_delete(self, keys: Sequence[TKey], **kwargs: Any) -> None:\n        collection = self._get_collection()\n        await collection.delete_many({MONGODB_ID_FIELD: {\"$in\": keys}})\n\n    def _replace_key_field(self, record: dict[str, Any]) -> dict[str, Any]:\n        if self._key_field_name == MONGODB_ID_FIELD:\n            return record\n        return {\n            MONGODB_ID_FIELD: record.pop(self._key_field_name, None),\n            **record,\n        }\n\n    def _reset_key_field(self, record: dict[str, Any]) -> dict[str, Any]:","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/connectors/mongodb.py#L268-L304","documentation":"Raised by MongoDBAtlasCollection._inner_get (NotImplementedError) when get is called with NO keys but WITH a GetFilteredRecordOptions filter — i.e. a filtered/scan read, which this connector does not yet implement. Calling get with no keys and no options returns None (valid), and get with keys works normally; only the filtered-without-keys combination is unsupported.","triggerScenarios":"Calling `await collection.get(options=GetFilteredRecordOptions(...))` with keys left as None. The connector can fetch by _id list and can return None, but cannot run an arbitrary filter scan.","commonSituations":"Generic framework code that tries filtered reads uniformly across connectors; migrating a workflow that relied on filtered gets from another store; passing options positionally/accidentally without keys.","solutions":["Provide explicit keys to get(): `await collection.get(keys=['id1','id2'])`.","For filtered queries, use vector search (search()) instead of get().","If you need filtered reads, run a raw find via the underlying mongo_client/collection."],"exampleFix":"// before\nrecs = await collection.get(options=GetFilteredRecordOptions(filter={'status':'active'}))\n// after\nrecs = await collection.get(keys=known_ids)","handlingStrategy":"validation","validationCode":"if not keys and options is not None:\n    raise ValueError('MongoDBAtlasCollection does not support filtered get without keys; use search()')\nresult = await collection.get(keys=keys, options=options)","typeGuard":null,"tryCatchPattern":"try:\n    result = await collection.get(options=options)\nexcept NotImplementedError:\n    result = await collection.get(keys=known_ids)  # fall back to keyed read","preventionTips":["Always pass keys to get(); use search() for filtered queries.","Do not route generic filtered-scan logic through this collection's get().","Document per-connector capabilities so framework code avoids unsupported combos."],"tags":["mongodb","vector-store","not-implemented","filtered-read"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}