access to joined documents

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

access to joined documents

Michael Sokolov-4
Hi List, I have a question about query-time joins as provided by
JoinUtil in the join package. As I understand it, the main documents
returned by the query will be those having a value in the to-field
that matches the value in the from-field of some documents returned by
the fromQuery.

My question is whether it is possible to retrieve the docids of the
from-document(s) that contributed to the match of a given result
(to-document). The only way I can see how to do it is effectively to
re-run the fromQuery with the added constraint that the fromField
matches the values pulled from the result document's toField. But this
seems messy given that the work was already done in some sense while
executing the original query. I looked around but didn't see anything
that would be keeping track of these matches - did I miss it? Is there
a better approach than what I described?

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: access to joined documents

Adrien Grand
Hi Mike,

The best approach would be to run the query again indeed since the
join is performed in a lossy way: we record score contributions but
not which documents contributed to the score. For instance this is
what the inner_hits feature of Elasticsearch does when used with
query-time joins.
On Fri, Nov 2, 2018 at 6:17 PM Michael Sokolov <[hidden email]> wrote:

>
> Hi List, I have a question about query-time joins as provided by
> JoinUtil in the join package. As I understand it, the main documents
> returned by the query will be those having a value in the to-field
> that matches the value in the from-field of some documents returned by
> the fromQuery.
>
> My question is whether it is possible to retrieve the docids of the
> from-document(s) that contributed to the match of a given result
> (to-document). The only way I can see how to do it is effectively to
> re-run the fromQuery with the added constraint that the fromField
> matches the values pulled from the result document's toField. But this
> seems messy given that the work was already done in some sense while
> executing the original query. I looked around but didn't see anything
> that would be keeping track of these matches - did I miss it? Is there
> a better approach than what I described?
>
> -Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Adrien

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: access to joined documents

Michael Sokolov-4
Hmm yes it looked that way to me, thanks Adrien. Maybe there is an
opportunity in the non scoring case to track these and save some effort.

On Wed, Nov 14, 2018, 9:10 AM Adrien Grand <[hidden email] wrote:

> Hi Mike,
>
> The best approach would be to run the query again indeed since the
> join is performed in a lossy way: we record score contributions but
> not which documents contributed to the score. For instance this is
> what the inner_hits feature of Elasticsearch does when used with
> query-time joins.
> On Fri, Nov 2, 2018 at 6:17 PM Michael Sokolov <[hidden email]> wrote:
> >
> > Hi List, I have a question about query-time joins as provided by
> > JoinUtil in the join package. As I understand it, the main documents
> > returned by the query will be those having a value in the to-field
> > that matches the value in the from-field of some documents returned by
> > the fromQuery.
> >
> > My question is whether it is possible to retrieve the docids of the
> > from-document(s) that contributed to the match of a given result
> > (to-document). The only way I can see how to do it is effectively to
> > re-run the fromQuery with the added constraint that the fromField
> > matches the values pulled from the result document's toField. But this
> > seems messy given that the work was already done in some sense while
> > executing the original query. I looked around but didn't see anything
> > that would be keeping track of these matches - did I miss it? Is there
> > a better approach than what I described?
> >
> > -Mike
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> --
> Adrien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>