Okay Thank you ,does nested objects help here .

Is it possible to get only inner objects (from nested objects ) ?

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/nested-objects.html




On Tuesday, 27 January 2015 21:07:35 UTC-5, David Pilato wrote:
>
> You need to run 2 queries in that case IMHO.
>
> --
> David ;-)
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
>
> Le 28 janv. 2015 à 00:54, buddarapu nagaraju <budda...@gmail.com 
> <javascript:>> a écrit :
>
> Any answers for me :)?
>
> Regards
> Nagaraju
> 908 517 6981
>
> On Sun, Jan 25, 2015 at 2:14 PM, buddarapu nagaraju <budda...@gmail.com 
> <javascript:>> wrote:
>
>> I dont get it exactly so explaining doc structure and example docs .I 
>> understand that HasChild will get you the parent documents and HasParent 
>> will get the only parents.Please help me in understanding 
>>
>> have two document types :one is FakeDocument which is the fake document 
>> holding the group id for all docs in a group 
>> and other is Document which is the actual document
>>
>> Example Docs are:
>>
>>
>> FakeDocument{
>> Id:"G1"
>> }
>> FakeDocument{
>> Id:"G2"
>> }
>>
>> Indexed two documents under group "G1"
>>
>> Document1{
>> Name:One
>>
>> }
>>
>> Document2{
>> Name:Two
>>
>> }
>>
>>
>> Indexed two documents under group "G2"
>>
>> Document3{
>> Name:Three
>>
>> }
>>
>> Document4{
>> Name:Four
>>
>> }
>>
>>
>> Now my scenario is 
>>
>>
>> querying for "Name:One" should result me document with name :"One" and 
>> also all other documents that has same _parentId in one request 
>>
>>
>>
>>
>>
>>
>> Regards
>> Nagaraju
>> 908 517 6981
>>
>> On Sun, Jan 25, 2015 at 12:14 AM, David Pilato <da...@pilato.fr 
>> <javascript:>> wrote:
>>
>>> If you are using Parent / Child feature, you should look at has_parent, 
>>> has_child filters.
>>>
>>>
>>> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-has-child-filter.html#query-dsl-has-child-filter
>>>
>>> In that case, you don't need to get back parent id yourself.
>>>
>>> If you are not using Parent / child, I'm afraid you need to run 2 
>>> queries.
>>>
>>> My 2 cents 
>>>
>>> --
>>> David ;-)
>>> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
>>>
>>> Le 25 janv. 2015 à 05:44, bvnrwork <budda...@gmail.com <javascript:>> a 
>>> écrit :
>>>
>>> Hi,
>>>
>>> can some one help me on this.
>>>
>>> have scenario where have Query1 which qualifies some documents and now I 
>>> want to take _parent id of qualified documents and search on _parentid 
>>> field to get the qualified documents and all others documents with same 
>>> parent id 
>>>
>>> .These two searches I want to do it in one single request , is it 
>>> possible?
>>>
>>> Regards,
>>> Nagaraju
>>>
>>> -- 
>>> 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 elasticsearc...@googlegroups.com <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elasticsearch/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/elasticsearch/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>  -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "elasticsearch" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/elasticsearch/Ye7ICf_ZUkg/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> elasticsearc...@googlegroups.com <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elasticsearch/A4959B00-FB5F-4EAA-9304-5B2BCC490601%40pilato.fr
>>>  
>>> <https://groups.google.com/d/msgid/elasticsearch/A4959B00-FB5F-4EAA-9304-5B2BCC490601%40pilato.fr?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>  -- 
> 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 elasticsearc...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/CAFtuXX%2B2wEtz7ff-xXa%2BztvC%2B%2Bg-hpKY4s5X0%2BRVAZ8U5d7Puw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/elasticsearch/CAFtuXX%2B2wEtz7ff-xXa%2BztvC%2B%2Bg-hpKY4s5X0%2BRVAZ8U5d7Puw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/3146fbf6-63e9-45bf-8593-90dcacf16184%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to