# Filtering from default Javascript

**URL:** <https://discuss.elastic.co/t/filtering-from-default-javascript/203265>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [October 11, 2019, 3:53pm UTC](https://discuss.elastic.co/t/filtering-from-default-javascript/203265 "2019-10-11T15:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeDev](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@DeDev](https://discuss.elastic.co/u/DeDev)\
**Post date:** [October 11, 2019, 3:53pm UTC](https://discuss.elastic.co/t/filtering-from-default-javascript/203265/1 "2019-10-11T15:53:06Z")

</div>

Is there any way to filter results using the Javascript snippet below? Instead of creating a lot of files for my project.

```
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t); e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e); })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');_st('install','xxx-xxxx-xxx','2.0.0');

```

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [October 22, 2019, 7:57pm UTC](https://discuss.elastic.co/t/filtering-from-default-javascript/203265/2 "2019-10-22T19:57:40Z")

</div>

Hey DeDev,

Unfortunately no, I don't believe there is a way to add a filter to your query with the default snippet.

Jason

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 19, 2019, 7:57pm UTC](https://discuss.elastic.co/t/filtering-from-default-javascript/203265/3 "2019-11-19T19:57:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
