Searching on Nested Document indexes : not on Parent Object

I have following document structure in ES :

{
"text" : "OTesting3"
"otag" : "otag4"
"pages" : [{
      "text" : "1"
        "tagDTO" : {
            "name" : "itag2"
        }
    }, {
     "text" : "2"
        "tagDTO" : {
            "name" : "itag4"
        }
    }
]
}

also i mapped pages as nested document, now i able to use nested query on parent object as expected but my problem is :

I also want to search on pages documents only so example if i search on "pages.text" : "1" i should get only one page rather than both pages. I read in documentation that these nested objects will be stored as separate documents so is there any way to search on these separate document

At the moment this isn't possible. If you had a match inside the nested
object the whole document is returned as hit.

On 4 March 2013 14:28, Vimlesh Mishra vimlesh.mishra@gmail.com wrote:

I have following document structure in ES :

{
"text" : "OTesting3"
"otag" : "otag4"
"pages" : [{
      "text" : "1"
        "tagDTO" : {
            "name" : "itag2"
        }
    }, {
     "text" : "2"
        "tagDTO" : {
            "name" : "itag4"
        }
    }
]
}

also i mapped pages as nested document, now i able to use nested query on
parent object as expected but my problem is :

I also want to search on pages documents only so example if i search on
"pages.text" : "1" i should get only one page rather than both pages. I
read
in documentation that these nested objects will be stored as separate
documents so is there any way to search on these separate document

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Searching-on-Nested-Document-indexes-not-on-Parent-Object-tp4030937.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.