Looks like I found my answer here:
https://groups.google.com/d/topic/elasticsearch/1_1zXSeRsxQ/discussion
Guess I'll start down the denormalization path. IF anyone has some
comments or opinions on the best way to structure relationships in ES, I'd
love to hear. Is the general sentiment to not model relationships and
simply retrieve IDs which you use through another, non-ES mechanism to find
(say, query a database) ?
Related, what's the performance of simply looking up a specific document by
it's ID? Is it O(n)? Does ES use something like b-trees for document ID
lookups?
Thanks!
-Zach
On Sunday, August 5, 2012 7:52:54 PM UTC-4, Zachary Tong wrote:
I believe the answer is "no", but wanted to check:
Is there a way to return the individual score of the nested documents that
match a query? I'm performing a query on nested docs which returns
appropriate parents, but I would like to know which nested child scored the
highest for the query. The nested score_mode simply tells me that "one of
the children scored well", but not which one. Is there any way to sort or
find the score of the nested children?Barring that, I'm not certain of the best way to structure my data.
Should I arrange the data in two types and denormalize so that one type
has a "foreign key" (to use relational db terminology) that points at the
other type, which would then require several more queries to access the
individual documents?Thanks!
-Zach