How to perform search on the qualified docs resulted from a query

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

If you are using Parent / Child feature, you should look at has_parent, has_child filters.

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 janv. 2015 à 05:44, bvnrwork budda08nitt@gmail.com 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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/A4959B00-FB5F-4EAA-9304-5B2BCC490601%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

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 david@pilato.fr wrote:

If you are using Parent / Child feature, you should look at has_parent,
has_child filters.

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 janv. 2015 à 05:44, bvnrwork budda08nitt@gmail.com 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 elasticsearch+unsubscribe@googlegroups.com.
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
elasticsearch+unsubscribe@googlegroups.com.
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAFtuXX%2B%2BpREVYLKLPrXdbNAS%3DrY5S%2BBkvkg_HxE5_V129CnA%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Any answers for me :)?

Regards
Nagaraju
908 517 6981

On Sun, Jan 25, 2015 at 2:14 PM, buddarapu nagaraju budda08nitt@gmail.com
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 david@pilato.fr wrote:

If you are using Parent / Child feature, you should look at has_parent,
has_child filters.

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 janv. 2015 à 05:44, bvnrwork budda08nitt@gmail.com 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 elasticsearch+unsubscribe@googlegroups.com.
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
elasticsearch+unsubscribe@googlegroups.com.
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 elasticsearch+unsubscribe@googlegroups.com.
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.
For more options, visit https://groups.google.com/d/optout.

You need to run 2 queries in that case IMHO.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 janv. 2015 à 00:54, buddarapu nagaraju budda08nitt@gmail.com a écrit :

Any answers for me :)?

Regards
Nagaraju
908 517 6981

On Sun, Jan 25, 2015 at 2:14 PM, buddarapu nagaraju budda08nitt@gmail.com 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 david@pilato.fr wrote:
If you are using Parent / Child feature, you should look at has_parent, has_child filters.

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 janv. 2015 à 05:44, bvnrwork budda08nitt@gmail.com 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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com.
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/A4959B00-FB5F-4EAA-9304-5B2BCC490601%40pilato.fr.

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+unsubscribe@googlegroups.com.
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.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/70D06388-5173-4225-97A7-9BB78A78A096%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Okay Thank you ,does nested objects help here .

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

On Tuesday, 27 January 2015 21:07:35 UTC-5, David Pilato wrote:

You need to run 2 queries in that case IMHO.

--
David :wink:
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.

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 :wink:
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+unsubscribe@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.

In 1.5, a new inner hits feature will come. Add inner hits to nested and parent/child queries by martijnvg · Pull Request #8153 · elastic/elasticsearch · GitHub

David

Le 28 janv. 2015 à 04:29, bvnrwork budda08nitt@gmail.com a écrit :

Okay Thank you ,does nested objects help here .

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

Elasticsearch Platform — Find real-time answers at scale | Elastic

On Tuesday, 27 January 2015 21:07:35 UTC-5, David Pilato wrote:
You need to run 2 queries in that case IMHO.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 janv. 2015 à 00:54, buddarapu nagaraju budda...@gmail.com 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 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 wrote:
If you are using Parent / Child feature, you should look at has_parent, has_child filters.

Elasticsearch Platform — Find real-time answers at scale | Elastic

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 janv. 2015 à 05:44, bvnrwork budda...@gmail.com 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a1946c82-7239-4e56-a082-ab11e66b4041%40googlegroups.com.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/A4959B00-FB5F-4EAA-9304-5B2BCC490601%40pilato.fr.

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.
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.
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+unsubscribe@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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1C12ABD6-8762-46B5-AA2C-5DA249BF61AD%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.