My understanding of the terms lookup mechanism is that you can provide a term and then as a result of that surface the documents that match a particular term name. So for example if you had an User and a Transaction, you could lookup the user's name and surface his transactions.
However, if I wanted to surface all user's names across all transactions, I'm assuming that wouldn't be possible with this mechanism. i.e. a table that has both the user name and its transactions.
From reading the docs, I'm assuming that's where nesting/child-parent relationships comes in.
Terms lookup is just fetching a list of terms from a static document, and then using those values as the list of terms to filter by. So it isn't really any different from providing the list yourself, except it resides inside a document which can sometimes be easier to deal with (for "persistent" lists, long lists, etc).
If you just want a list of all users that had a transaction, you could do something like a terms aggregation on the username field... that'll give you a list of distinct terms (usernames) in the index.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.