# Search-bar and filtering in tutor-dev

**URL:** <https://discuss.openedx.org/t/search-bar-and-filtering-in-tutor-dev/9767>\
**Category:** Development\
**Tags:** tutor-plugin\
**Created:** [April 6, 2023, 12:20am UTC](https://discuss.openedx.org/t/search-bar-and-filtering-in-tutor-dev/9767 "2023-04-06T00:20:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![burkay](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/burkay/32/5144_2.png) [@burkay](https://discuss.openedx.org/u/burkay)\
**Post date:** [April 6, 2023, 12:20am UTC](https://discuss.openedx.org/t/search-bar-and-filtering-in-tutor-dev/9767/1 "2023-04-06T00:20:00Z")

</div>

Hello Everyone,

- I want to use search-bar and filtering feature in tutor-dev.
- I set the

```auto
FEATURES: 
  ENABLE_COURSE_DISCOVERY: true 
  ENABLE_COURSEWARE_SEARCH: true

```

variables in the `tutor/env/apps/openedx/config/lms.env.yml` file.

- I also added

```auto
FEATURES["ENABLE_COURSEWARE_SEARCH"] = True FEATURES["ENABLE_COURSE_DISCOVERY"] = True

```

to the `tutor/env/apps/openedx/settings/lms/development.py` file.  
While search-bar and filtering work for tutor local, these features do not work for tutor dev. Is there a step I skipped or made wrong? Thank you.

---

<div class="post-metadata">

**Author:** ![icarrr](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/icarrr/32/300_2.png) [@icarrr](https://discuss.openedx.org/u/icarrr)\
**Post date:** [April 6, 2023, 3:20am UTC](https://discuss.openedx.org/t/search-bar-and-filtering-in-tutor-dev/9767/2 "2023-04-06T03:20:29Z")

</div>

Hi @burkay

To enable it, tried to create a plugin file called coursewaresearch.yml.

```bash
mkdir -p "$(tutor plugins printroot)"
nano "$(tutor plugins printroot)"/coursewaresearch.yml

```

Then put script below into coursewaresearch.yml.

```auto
name: coursewaresearch
version: 0.1.0
patches:
  lms-env-features: |
    "ENABLE_COURSEWARE_SEARCH": true,
    "ENABLE_COURSE_DISCOVERY": true

```

After that, enable plugins dan restart LMS

```bash
tutor plugins enable coursewaresearch && tutor config save
tutor local restart lms

```

---

<div class="post-metadata">

**Author:** ![Yagnesh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/yagnesh/32/9571_2.png) [@Yagnesh](https://discuss.openedx.org/u/Yagnesh)\
**Post date:** [April 6, 2023, 4:02am UTC](https://discuss.openedx.org/t/search-bar-and-filtering-in-tutor-dev/9767/3 "2023-04-06T04:02:55Z")

</div>

@burkay welcome to the community. u need to create a simple plugin

` mkdir -p "$(tutor plugins printroot)"`

`nano "$(tutor plugins printroot)/myplugin.py"`

u can change the myplugin.py name as search.py and whatever u like

then simply add this

```auto
from tutor import hooks

hooks.Filters.ENV_PATCHES.add_item(
    (
        "openedx-common-settings",
        """
FEATURES['ENABLE_COURSE_DISCOVERY'] = True
FEATURES['ENABLE_COURSEWARE_SEARCH'] = True
FEATURES['ENABLE_DASHBOARD_SEARCH'] = True

FEATURES['ENABLE_COURSEWARE_INDEX'] = True
FEATURES['ENABLE_LIBRARY_INDEX'] = True

"""
    )
)

```

`tutor plugins enable myplugin`  
`tutor config save`  
`tutor dev start -d`

then just simply hit if your tutor is installed with Olive so `tutor dev launch` other wise` tutor dev quickstart`  
`tutor plugins list` is check whether a plugin is enabled or not  
your search is now working

---

<div class="post-metadata">

**Author:** ![burkay](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/burkay/32/5144_2.png) [@burkay](https://discuss.openedx.org/u/burkay)\
**Post date:** [April 6, 2023, 10:02am UTC](https://discuss.openedx.org/t/search-bar-and-filtering-in-tutor-dev/9767/4 "2023-04-06T10:02:25Z")

</div>

Thank you both very much for your answers. I tried Yagnesh’s answer and my problem was solved. I’ll try the other answer at a convenient time. I am grateful to both of you.
