# Un-overload \`smtk::resource::Resource::find()\`

**URL:** https://discourse.kitware.com/t/un-overload-smtk-find/730
**Category:** Design
**Created:** [October 30, 2021, 10:39pm UTC](https://discourse.kitware.com/t/un-overload-smtk-find/730 "2021-10-30T22:39:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.kitware.com/user_avatar/discourse.kitware.com/dcthomp/32/10_2.png) [@dcthomp](https://discourse.kitware.com/u/dcthomp)
#### Post date: [October 30, 2021, 10:39pm UTC](https://discourse.kitware.com/t/un-overload-smtk-find/730/1 "2021-10-30T22:39:52Z")

</div>

## Problem statement

There are currently 2 signatures for finding components in a resource:

```c++
class Resource
{
public:
    std::shared_ptr<Component> find(const smtk::common::UUID& id);
    std::set<std::shared_ptr<Component>> find(const std::string& query);
};

```

This is causing problems with python wrapping because pybind11 cannot be configured to provide both overloads (UUIDs can be constructed from strings, so the first signature always matches as far as python is concerned).

### Proposal

1. If we rename the second signature (that takes a query string and returns a set of components) from `find()` to `filter()` this problem is resolved.
2. We should also rename the templated `findAs(const std::string& query)` to `filterAs()` for consistency.

_Poll ([view on site](https://discourse.kitware.com/t/un-overload-smtk-find/730/1))_
