Top_children explain


(slushi) #1

I am using the top_children query and noticed that the explain is just "not
implemented yet...". I had a look at the TopChildrenQuery.java file, it
seems implementing explain would be something like keeping track of the
child doc id's in the ParentDoc nested class and then in the explain()
method have the child query explain each hit. would this be the right
approach and acceptable? If so, I could take a shot at implementing it.
Having explain information would be very useful for me.


(Shay Banon) #2

Yea, its possible, though for top children, it might make sense to also
somehow get the explain of the other query as well, which might prove
tricky...

On Sat, Apr 21, 2012 at 10:48 PM, slushi kireetreddy@gmail.com wrote:

I am using the top_children query and noticed that the explain is just
"not implemented yet...". I had a look at the TopChildrenQuery.java file,
it seems implementing explain would be something like keeping track of the
child doc id's in the ParentDoc nested class and then in the explain()
method have the child query explain each hit. would this be the right
approach and acceptable? If so, I could take a shot at implementing it.
Having explain information would be very useful for me.


(slushi) #3

Yeah, that's where I got stuck. I thought because parent/child routing
defaults to be the same, I could use the subDoc variable from
processResults() to call explain on the child query/documents in
ParentWeight.explain(), but that didn't work. Is there a way to get the
correct reader for the child doc?

On Wednesday, April 25, 2012 11:32:29 AM UTC-4, kimchy wrote:

Yea, its possible, though for top children, it might make sense to also
somehow get the explain of the other query as well, which might prove
tricky...

On Sat, Apr 21, 2012 at 10:48 PM, slushi kireetreddy@gmail.com wrote:

I am using the top_children query and noticed that the explain is just
"not implemented yet...". I had a look at the TopChildrenQuery.java file,
it seems implementing explain would be something like keeping track of the
child doc id's in the ParentDoc nested class and then in the explain()
method have the child query explain each hit. would this be the right
approach and acceptable? If so, I could take a shot at implementing it.
Having explain information would be very useful for me.


(Shay Banon) #4

It should be possible, just need a bit work to look into it. Open an issue
so we can track it there?

On Wed, Apr 25, 2012 at 6:57 PM, slushi kireetreddy@gmail.com wrote:

Yeah, that's where I got stuck. I thought because parent/child routing
defaults to be the same, I could use the subDoc variable from
processResults() to call explain on the child query/documents in
ParentWeight.explain(), but that didn't work. Is there a way to get the
correct reader for the child doc?

On Wednesday, April 25, 2012 11:32:29 AM UTC-4, kimchy wrote:

Yea, its possible, though for top children, it might make sense to also
somehow get the explain of the other query as well, which might prove
tricky...

On Sat, Apr 21, 2012 at 10:48 PM, slushi kireetreddy@gmail.com wrote:

I am using the top_children query and noticed that the explain is just
"not implemented yet...". I had a look at the TopChildrenQuery.java file,
it seems implementing explain would be something like keeping track of the
child doc id's in the ParentDoc nested class and then in the explain()
method have the child query explain each hit. would this be the right
approach and acceptable? If so, I could take a shot at implementing it.
Having explain information would be very useful for me.


(slushi) #5

I opened issue 1889, thanks.

On Apr 27, 2012, at 5:04 AM, Shay Banon wrote:

It should be possible, just need a bit work to look into it. Open an issue so we can track it there?

On Wed, Apr 25, 2012 at 6:57 PM, slushi kireetreddy@gmail.com wrote:
Yeah, that's where I got stuck. I thought because parent/child routing defaults to be the same, I could use the subDoc variable from processResults() to call explain on the child query/documents in ParentWeight.explain(), but that didn't work. Is there a way to get the correct reader for the child doc?

On Wednesday, April 25, 2012 11:32:29 AM UTC-4, kimchy wrote:
Yea, its possible, though for top children, it might make sense to also somehow get the explain of the other query as well, which might prove tricky...

On Sat, Apr 21, 2012 at 10:48 PM, slushi kireetreddy@gmail.com wrote:
I am using the top_children query and noticed that the explain is just "not implemented yet...". I had a look at the TopChildrenQuery.java file, it seems implementing explain would be something like keeping track of the child doc id's in the ParentDoc nested class and then in the explain() method have the child query explain each hit. would this be the right approach and acceptable? If so, I could take a shot at implementing it. Having explain information would be very useful for me.


(system) #6