Find documents where field "transaction" is the same as in the document where another fields equals something

Hello. I have following documents:

doc1> transaction:1, initiator:john, info:somedata
doc2> transaction:1, info: anotherdata
doc3> transaction:1, info: anotherdata

I need to return all documents where transaction id is the same as the transaction id where field initiator is "john".

Is it possible? How?

May be with parent/child feature.
Or field collapsing.

But I'd better recommend denormalizing your data.

If the primary object you are searching for is a transaction, index a transaction and not a sub part of a transaction.

My 0.02 cents

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.