QueryStringQuery not working after upgrade to 5.6.7 from 2.4

I have a field "instancename" in 2.4 which is String, not_analyzed, and stored. I have indexed a document that has a value for that field as "ProblemFlow"

The below query is not returning any hits on 5.6.7 server.. However if i modify the query to lowercase the query string like "problemflow", i am able to get a match as expected. i also get a hit when i search without the leading wild card, i.e. "ProblemFlow*" . I am using a custom analyzer for analysis which is configured as default analyzer in the index settings. The same analyzer is also being used during query time. This custom analyzer converts the fields to lowercase and tokenizes the strings based on few special chars.

Is there any behavioural change between 2.4 and 5.6 versions specially around usage of leading wild card queries that is causing this behaviour..

"from" : 0,
"size" : 50,
"query" : {
"bool" : {
"must" : [
{
"query_string" : {
"query" : "ProblemFlow",
"default_field" : "instancename",
"fields" : [ ],
"use_dis_max" : true,
"tie_breaker" : 0.0,
"default_operator" : "and",
"auto_generate_phrase_queries" : false,
"max_determinized_states" : 10000,
"allow_leading_wildcard" : true,
"enable_position_increments" : true,
"fuzziness" : "AUTO",
"fuzzy_prefix_length" : 0,
"fuzzy_max_expansions" : 50,
"phrase_slop" : 0,
"analyze_wildcard" : true,
"escape" : false,
"split_on_whitespace" : true,
"boost" : 1.0,
"analyzer" : "my_custom_analyzer"
}
}
],
"filter" : [
{
"query_string" : {
"query" : "",
"default_field" : "instancename",
"fields" : [ ],
"use_dis_max" : true,
"tie_breaker" : 0.0,
"default_operator" : "and",
"auto_generate_phrase_queries" : false,
"max_determinized_states" : 10000,
"allow_leading_wildcard" : true,
"enable_position_increments" : true,
"fuzziness" : "AUTO",
"fuzzy_prefix_length" : 0,
"fuzzy_max_expansions" : 50,
"phrase_slop" : 0,
"escape" : false,
"split_on_whitespace" : true,
"boost" : 1.0,
"analyzer" : "my_custom_analyzer"
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
"stored_fields" : "
"
}

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