# KV filter stripping out parentheses

**URL:** <https://discuss.elastic.co/t/kv-filter-stripping-out-parentheses/101033>\
**Category:** Logstash\
**Created:** [September 19, 2017, 1:50pm UTC](https://discuss.elastic.co/t/kv-filter-stripping-out-parentheses/101033 "2017-09-19T13:50:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blaisefonseca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blaisefonseca/32/22290_2.png) [@blaisefonseca](https://discuss.elastic.co/u/blaisefonseca)\
**Post date:** [September 19, 2017, 1:50pm UTC](https://discuss.elastic.co/t/kv-filter-stripping-out-parentheses/101033/1 "2017-09-19T13:50:39Z")

</div>

I am using KV filter to split query string, however, the filter strips parentheses at the beginning and end, how can I avoid this?  
Below is my KV filter  
kv {  
target =\> "cs\_uri\_query"  
allow\_duplicate\_values =\> false  
field\_split =\> "&?"  
source =\> "uri\_query"  
}  
which outputs to

cs\_uri\_query.q = "app:test AND (schema\_s:contact" it shoud be cs\_uri\_query.q = "(app:test AND (schema\_s:contact))"

---

<div class="post-metadata">

**Author:** ![blaisefonseca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blaisefonseca/32/22290_2.png) [@blaisefonseca](https://discuss.elastic.co/u/blaisefonseca)\
**Post date:** [September 20, 2017, 7:41pm UTC](https://discuss.elastic.co/t/kv-filter-stripping-out-parentheses/101033/2 "2017-09-20T19:41:54Z")

</div>

include\_brackets =\> false fixed my issue

---

<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:** [October 18, 2017, 7:42pm UTC](https://discuss.elastic.co/t/kv-filter-stripping-out-parentheses/101033/3 "2017-10-18T19:42:16Z")

</div>

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