Skip to content

Instantly share code, notes, and snippets.

@nickhoffman
Created January 21, 2012 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickhoffman/1654247 to your computer and use it in GitHub Desktop.
Save nickhoffman/1654247 to your computer and use it in GitHub Desktop.
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
}
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" : [ ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment