# QueryStringQueryBuilder.lowercaseExpandedTerms() deprecated in elastic search v5.6

**URL:** <https://discuss.elastic.co/t/querystringquerybuilder-lowercaseexpandedterms-deprecated-in-elastic-search-v5-6/176892>\
**Category:** Elasticsearch\
**Created:** [April 15, 2019, 11:42am UTC](https://discuss.elastic.co/t/querystringquerybuilder-lowercaseexpandedterms-deprecated-in-elastic-search-v5-6/176892 "2019-04-15T11:42:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarsh](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@utkarsh](https://discuss.elastic.co/u/utkarsh)\
**Post date:** [April 15, 2019, 11:42am UTC](https://discuss.elastic.co/t/querystringquerybuilder-lowercaseexpandedterms-deprecated-in-elastic-search-v5-6/176892/1 "2019-04-15T11:42:30Z")

</div>

I am upgrading the elastic search from v2.3.3 to v5.6.2. I am facing the error: Cannot resolve symbol: lowercaseExpanedTerms(boolean).

Below is the line of code where the error occurs:

queryStringQueryBuilder = valueTypeEnum == SearchCriteria.ValueTypeEnum.STRING\_NOT\_ANALYZED ?  
queryStringQueryBuilder.lowercaseExpandedTerms(false) : //cannot find symbol  
queryStringQueryBuilder.analyzer(ANALYZER);

Please help 🙂

---

<div class="post-metadata">

**Author:** ![utkarsh](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@utkarsh](https://discuss.elastic.co/u/utkarsh)\
**Post date:** [April 16, 2019, 9:13am UTC](https://discuss.elastic.co/t/querystringquerybuilder-lowercaseexpandedterms-deprecated-in-elastic-search-v5-6/176892/2 "2019-04-16T09:13:02Z")

</div>

After following the discussion on github for this commit, developers have stated that Lucene will take care of whether or not the terms to be converted into lowercase.

So i think that having the line below will have same impact as the old code-  
queryStringQueryBuilder=queryStringQueryBuilder.analyzer(ANALYZER);

instead of the below old code-  
queryStringQueryBuilder = valueTypeEnum == SearchCriteria.ValueTypeEnum.STRING\_NOT\_ANALYZED ?  
queryStringQueryBuilder.lowercaseExpandedTerms(false) : //cannot find symbol  
queryStringQueryBuilder.analyzer(ANALYZER);

Please suggest, if there is something else that can be done or if I am missing something.  
Please help 🙂

---

<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:** [May 14, 2019, 9:13am UTC](https://discuss.elastic.co/t/querystringquerybuilder-lowercaseexpandedterms-deprecated-in-elastic-search-v5-6/176892/3 "2019-05-14T09:13:03Z")

</div>

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