I followed the following links in following wiki's to try out facet search
on nested documents but failed with the following error
WIKI - http://www.elasticsearch.org/guide/reference/mapping/nested-type.html,
http://www.elasticsearch.org/guide/reference/query-dsl/nested-query.html
I am trying out this for sometime without any luck or understanding the
nature of the problem.
Please help me out of this issue .
vineeth@vineeth-XPS-L501X:~/elasticSearch$ curl -XPOST
localhost:9200/kerala -d @createIndex ; echo
{"ok":true,"acknowledged":true}
vineeth@vineeth-XPS-L501X:~/elasticSearch$ cat createIndex
{
"public" : {
"properties" : {
"obj1" : {
"type" : "nested"
}
}
}
}
vineeth@vineeth-XPS-L501X:~/elasticSearch$ curl -XPOST
localhost:9200/kerala/public -d @sampleDoc ; echo
{"ok":true,"_index":"kerala","_type":"public","_id":"hAqFUQlQQzSnTk_3VDr6oQ","_version":1}
vineeth@vineeth-XPS-L501X:~/elasticSearch$ curl -XPOST
localhost:9200/kerala/public -d @sampleDoc ; echo
{"ok":true,"_index":"kerala","_type":"public","_id":"8gEPfNhFQ3ao6nhKvLfXlw","_version":1}
vineeth@vineeth-XPS-L501X:~/elasticSearch$ cat sampleDoc
{
"obj1" : [
{
"name" : "blue",
"count" : 4
},
{
"name" : "green",
"count" : 6
}
]
}
vineeth@vineeth-XPS-L501X:~/elasticSearch$ cat query
{
"nested" : {
"path" : "obj1",
"score_mode" : "avg",
"query" : {
"bool" : {
"must" : [
{
"text" : {"obj1.name" : "blue"}
},
{
"range" : {"obj1.count" : {"gt" : 5}}
}
]
}
}
}
}
vineeth@vineeth-XPS-L501X:~/elasticSearch$ curl -XPOST
localhost:9200/kerala/public/_search -d @query
{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
total failure; shardFailures {[wyPXb3DjT-WLKRKFTsR5uA][kerala][4]:
RemoteTransportException[[DJ][inet[/192.168.1.2:9302]][search/phase/query]];
nested: SearchParseException[[kerala][4]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{ "nested" : { "path" :
"obj1", "score_mode" : "avg", "query" : {
"bool" : { "must" : [
{ "text" : {"obj1.name" :
"blue"} }, {
"range" : {"obj1.count" : {"gt" : 5}}
} ] } } }}]]]; nested:
SearchParseException[[kerala][4]: from[-1],size[-1]: Parse Failure [No
parser for element [nested]]]; }{[Nk3z-jbdSNGdOgOUiA4UdQ][kerala][0]:
RemoteTransportException[[Redwing][inet[/192.168.1.2:9301]][search/phase/query]];
nested: SearchParseException[[kerala][0]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{ "nested" : { "path" :
"obj1", "score_mode" : "avg", "query" : {
"bool" : { "must" : [
{ "text" : {"obj1.name" :
"blue"} }, {
"range" : {"obj1.count" : {"gt" : 5}}
} ] } } }}]]]; nested:
SearchParseException[[kerala][0]: from[-1],size[-1]: Parse Failure [No
parser for element [nested]]]; }{[wyPXb3DjT-WLKRKFTsR5uA][kerala][3]:
RemoteTransportException[[DJ][inet[/192.168.1.2:9302]][search/phase/query]];
nested: SearchParseException[[kerala][3]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{ "nested" : { "path" :
"obj1", "score_mode" : "avg", "query" : {
"bool" : { "must" : [
{ "text" : {"obj1.name" :
"blue"} }, {
"range" : {"obj1.count" : {"gt" : 5}}
} ] } } }}]]]; nested:
SearchParseException[[kerala][3]: from[-1],size[-1]: Parse Failure [No
parser for element [nested]]]; }{[SJhaK1cERxuctG6ZUM4JMw][kerala][1]:
SearchParseException[[kerala][1]: from[-1],size[-1]: Parse Failure [Failed
to parse source [{ "nested" : { "path" : "obj1",
"score_mode" : "avg", "query" : { "bool" :
{ "must" : [ {
"text" : {"obj1.name" : "blue"}
}, { "range" : {"obj1.count"
: {"gt" : 5}} } ] }
} }}]]]; nested: SearchParseException[[kerala][1]: from[-1],size[-1]:
Parse Failure [No parser for element [nested]]];
}{[wyPXb3DjT-WLKRKFTsR5uA][kerala][2]:
RemoteTransportException[[DJ][inet[/192.168.1.2:9302]][search/phase/query]];
nested: SearchParseException[[kerala][2]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{ "nested" : { "path" :
"obj1", "score_mode" : "avg", "query" : {
"bool" : { "must" : [
{ "text" : {"obj1.name" :
"blue"} }, {
"range" : {"obj1.count" : {"gt" : 5}}
} ] } } }}]]]; nested:
SearchParseException[[kerala][2]: from[-1],size[-1]: Parse Failure [No
parser for element [nested]]]; }]","status":500}