public
Created

  • Download Gist
query_with_exclamation.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
curl 'localhost:9200/development_products/product/_search?pretty=true' -d '
{
"query" : {
"dis_max" : {
"queries" : [
{ "field" : {"name" : "Arise!"}},
{ "field" : {"catalog.name" : "Arise!"}}
]
}
}
}'
 
{
"error" : "SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[6caocL0HTl-fLv_XV5IwNg][development_products][2]: SearchParseException[[development_products][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n \"query\" : {\n \"dis_max\" : {\n \"queries\" : [\n { \"field\" : {\"name\" : \"Arise!\"}},\n { \"field\" : {\"catalog.name\" : \"Arise!\"}}\n ]\n }\n }\n}]]]; nested: QueryParsingException[[development_products] Failed to parse query [Arise!]]; nested: ParseException[Cannot parse 'Arise!': Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; nested: ParseException[Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; }{[6caocL0HTl-fLv_XV5IwNg][development_products][1]: SearchParseException[[development_products][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n \"query\" : {\n \"dis_max\" : {\n \"queries\" : [\n { \"field\" : {\"name\" : \"Arise!\"}},\n { \"field\" : {\"catalog.name\" : \"Arise!\"}}\n ]\n }\n }\n}]]]; nested: QueryParsingException[[development_products] Failed to parse query [Arise!]]; nested: ParseException[Cannot parse 'Arise!': Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; nested: ParseException[Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; }{[6caocL0HTl-fLv_XV5IwNg][development_products][0]: SearchParseException[[development_products][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n \"query\" : {\n \"dis_max\" : {\n \"queries\" : [\n { \"field\" : {\"name\" : \"Arise!\"}},\n { \"field\" : {\"catalog.name\" : \"Arise!\"}}\n ]\n }\n }\n}]]]; nested: QueryParsingException[[development_products] Failed to parse query [Arise!]]; nested: ParseException[Cannot parse 'Arise!': Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; nested: ParseException[Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; }{[6caocL0HTl-fLv_XV5IwNg][development_products][4]: SearchParseException[[development_products][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n \"query\" : {\n \"dis_max\" : {\n \"queries\" : [\n { \"field\" : {\"name\" : \"Arise!\"}},\n { \"field\" : {\"catalog.name\" : \"Arise!\"}}\n ]\n }\n }\n}]]]; nested: QueryParsingException[[development_products] Failed to parse query [Arise!]]; nested: ParseException[Cannot parse 'Arise!': Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; nested: ParseException[Encountered \"<EOF>\" at line 1, column 6.\nWas expecting one of:\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ]; }]",
"status" : 500
}
query_with_no_exclamation.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
curl 'localhost:9200/development_products/product/_search?pretty=true' -d '
{
"query" : {
"dis_max" : {
"queries" : [
{ "field" : {"name" : "Arise"}},
{ "field" : {"catalog.name" : "Arise"}}
]
}
}
}'
 
{
"took" : 20,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.