Hi - I'm pretty new to ES and have a specific use case I'd appreciate some
help with.
I have indexed about 100m 'articles' and each article has between 1 and 50
'comments' which I'm yet to index.
I'd like to be able to execute a query to return the 50 latest articles
(easy range query) along with just the most recent comment for each article
Each article and comment have a creationDateTime I'm just not sure of the
best way to index and query the data
I'd like to stay away from parent/child relationships if possible due to
the overhead and performance issues.
So is the best method to update a 'latestComment' field in the article each
time a comment is added? or could I store all comments in an array in the
article and somehow retrieve just the latest using a scripted field?
I would also like to be able to do the same query for 50 latest articles
where the most recent comment was made by a specific author. (the comment
has an author field). So essentially a 'Show me all articles where the
most recent comment was made by me" query.
I would really appreciate any help/pointers.
Regards
Matthew
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.