Parse exceptionin querystring

The following query
{
"query": {
"query_string": {
"query": "content_type:application/pdf",
"analyze_wildcard": true,
"minimum_should_match": "1"
}
}
}

gives me following parse exception :
Cannot parse 'content_type:application/pdf': Lexical error at line 1, column 29. Encountered: after : "/pdf"

This is the full log :
{
"error" : {
"root_cause" : [ {
"type" : "query_parsing_exception",
"reason" : "Failed to parse query [content_type:application/pdf]",
"index" : "79073282-6371-4282-a3f3-5ff5775b4bf5_.archive.av4",
"line" : 1,
"col" : 135
} ],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [ {
"shard" : 0,
"index" : "79073282-6371-4282-a3f3-5ff5775b4bf5_.archive.av4",
"node" : "Cd_WR8F2SnmziLLbHAa8Jw",
"reason" : {
"type" : "query_parsing_exception",
"reason" : "Failed to parse query [content_type:application/pdf]",
"index" : "79073282-6371-4282-a3f3-5ff5775b4bf5_.archive.av4",
"line" : 1,
"col" : 135,
"caused_by" : {
"type" : "parse_exception",
"reason" : "Cannot parse 'content_type:application/pdf': Lexical error at line 1, column 29. Encountered: after : "/pdf"",
"caused_by" : {
"type" : "token_mgr_error",
"reason" : "Lexical error at line 1, column 29. Encountered: after : "/pdf""
}
}
}
} ]
},
"status" : 400
}

anybody knows why ?

Thanks

the issue was about escaping / character. its fixed

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