# Problem with parentheses

**URL:** <https://discuss.elastic.co/t/problem-with-parentheses/115225>\
**Category:** Elasticsearch\
**Created:** [January 12, 2018, 6:39am UTC](https://discuss.elastic.co/t/problem-with-parentheses/115225 "2018-01-12T06:39:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjireddy543](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@anjireddy543](https://discuss.elastic.co/u/anjireddy543)\
**Post date:** [January 12, 2018, 6:40am UTC](https://discuss.elastic.co/t/problem-with-parentheses/115225/1 "2018-01-12T06:40:00Z")

</div>

Hi,

stmt1 :- I need to search text inside parentheses only if user specifies otherwise inside parentheses not searchable.

tried sol: used whitespace analyser and if parentheses in string then string passing like '\8(1)'

Ex:-  
search text : Rights Act, 1933 — Section 8(1)  
Document : Womens Rights Act, 1933 — Section 4, 8(1)  
Results: 1 results found -- correct

stmt2:- search text does not contain parentheses but document contain parentheses needs to find doc  
Ex:-  
search text : Rights Act, 1933 — Section 8  
Document : Womens Rights Act, 1933 — Section 4, 8(1)  
Results: 0 results found -- incorrect

In this scenario i need to find document. (i am not able to use standard analyser bcoz i dont want find any thing inside parentheses until they specify.)

---

<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:** [February 9, 2018, 6:40am UTC](https://discuss.elastic.co/t/problem-with-parentheses/115225/2 "2018-02-09T06:40:14Z")

</div>

Closed on February 9, 2018, 6:40am UTC

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