qiita-elasticsearch 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/qiita/elasticsearch/query.rb +5 -1
- data/lib/qiita/elasticsearch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7187590b9b23a7438390a285bd06fbed399a44f1
|
4
|
+
data.tar.gz: 82a7baa53b312991cbba0c4a0c63e87ed1b86cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff9f8bfc91c03839967e115ff84905f06f2b678c3b0fd479f0bd4ceaa18c4ea8fa53a4f680651731d974c1b6f58ae1cac922659ae3787987bba7bfad0b09368d
|
7
|
+
data.tar.gz: af7d9f318eb599afa6f6e9b65e42266ea792253c1559c7fd3f255cd982779292923183980752911fcc27817dcd47798884f523d0143c776d111c114c0a46aa42
|
data/CHANGELOG.md
CHANGED
@@ -57,7 +57,7 @@ module Qiita
|
|
57
57
|
|
58
58
|
# @return [Array] sort property for request body for Elasticsearch
|
59
59
|
def sort
|
60
|
-
case
|
60
|
+
case sort_term
|
61
61
|
when "created-asc"
|
62
62
|
[{ "created_at" => "asc" }, "_score"]
|
63
63
|
when "lgtms-asc"
|
@@ -81,6 +81,10 @@ module Qiita
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
def sort_term
|
85
|
+
@tokens.select(&:sort?).last.try(:term)
|
86
|
+
end
|
87
|
+
|
84
88
|
# @return [Hash] request body for Elasticsearch
|
85
89
|
def to_hash
|
86
90
|
{
|