diff options
author | Alex Legler <alex@a3li.li> | 2015-12-13 13:49:53 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2015-12-13 13:49:53 +0100 |
commit | 2c40030ed7a4195c7e44536f27af91eefc182229 (patch) | |
tree | 741ccd091dd12cc04407bfd51f56159bb74440f3 | |
parent | Fix logo path (diff) | |
download | frontend-2c40030ed7a4195c7e44536f27af91eefc182229.tar.gz frontend-2c40030ed7a4195c7e44536f27af91eefc182229.tar.bz2 frontend-2c40030ed7a4195c7e44536f27af91eefc182229.zip |
Sort message replies by date
-rw-r--r-- | lib/index.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/index.rb b/lib/index.rb index 3e88a43..6aee1e2 100644 --- a/lib/index.rb +++ b/lib/index.rb @@ -140,7 +140,10 @@ def get_child_data(list, parent_id) children = $es.search( index: 'ml-' + list, size: 100, - body: { query: { match: { parent: parent_id } } } + body: { + query: { match: { parent: parent_id } }, + sort: { date: 'asc' } + } ) if children['hits']['total'] == 0 |