How to get the combined data from two different document?

Hi there,

I have a situation where i need to apply some kind of join in the query,
like fetching some data from one document and some from other based on some
common attribute value. As for example the two documents are:
type :user

title:"abc",
id:"1",
city:"aaa",
DOB:"10-10-90",
fan_id:"10"

and the second document will be
type : relation
*
*
*
*
fan_of :"10",
"time_created":"398769978"

now i have to get the users from document type:user whose fan_of = fan_id
and sort the documents by second document 's time_created. Can anyone help
me??

Maybe top_children query could help:

Peter.

On Nov 7, 1:14 pm, Narinder Kaur narinder.k...@izap.in wrote:

Hi there,

I have a situation where i need to apply some kind of join in the query,
like fetching some data from one document and some from other based on some
common attribute value. As for example the two documents are:
type :user

title:"abc",
id:"1",
city:"aaa",
DOB:"10-10-90",
fan_id:"10"

and the second document will be
type : relation
*
*
*
*
fan_of :"10",
"time_created":"398769978"

now i have to get the users from document type:user whose fan_of = fan_id
and sort the documents by second document 's time_created. Can anyone help
me??