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

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 :slight_smile:

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 :slight_smile:

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