Nested json queries


(Matthew Terenzio) #1

I have some data being indexed that follows a pattern like this:

{
"http://www.thehour.com/story/511535/frank-fay-way-we-were" : {
"http://iptc.org/std/rNews/2011-05-17#headline" : [
{ "value" : "Frank Fay: Way We Were", "type" : "literal" }
],
"http://iptc.org/std/rNews/2011-05-17#dateCreated" : [
{ "value" : "2011-09-22", "type" : "literal" }
],
"http://iptc.org/std/rNews/2011-05-17#body" : [
{ "value" : " Robert Burgess, 15-year executive director of NEON, is
given . . .", "type" : "literal", "datatype" : "
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" }
]
}
}

Trying to wrap my head around the DSL query building. Would I need to
flatten this out in order to construct a query for the dateCreated like
this:

curl -XGET 'http://localhost:9200/test/item/_search' -d '{"query" : {"text"
: {"http%3A%2F%2Fiptc.org%2Fstd%2FrNews%2F2011-05-17%23dateCreated" :
"2011-10-07"} }}'

or is it possible to drill down into the nested structure above?

Thanks.


(system) #2