lsolr 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lsolr.rb +1 -8
- 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: b2f767515aadc312c4eb075eade0bec49647961b
|
4
|
+
data.tar.gz: 5783b321efaf0866d3fe2561734adb41be08631e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58056c0bd27ea5974d9d8ba219312e896ca7e18cd844c61b4e189bc9ccb09cf404781f0d337f88a3a2c484b1b5ae26111c0dd863e66e2ba2c327beca54aa0a97
|
7
|
+
data.tar.gz: 81a26a8ee3957c6cc2b45b1e153350407ce2079ef08dfbfe99acf3ce807fd21534478a32ab750e443eb645106b7ee63e0a7d2e9b7751ad10b66bf48d7180d2ba
|
data/lib/lsolr.rb
CHANGED
@@ -91,13 +91,6 @@ class LSolr
|
|
91
91
|
params.map { |f, v| build_query(f, v) }.reduce { |a, e| a.and(e) }
|
92
92
|
end
|
93
93
|
|
94
|
-
# Returns a empty term.
|
95
|
-
#
|
96
|
-
# @return [LSolr] a instance
|
97
|
-
def empty
|
98
|
-
new(:dummy)
|
99
|
-
end
|
100
|
-
|
101
94
|
private
|
102
95
|
|
103
96
|
def build_query(field, value) # rubocop:disable Metrics/CyclomaticComplexity
|
@@ -113,7 +106,7 @@ class LSolr
|
|
113
106
|
end
|
114
107
|
|
115
108
|
def build_array_query(field, values)
|
116
|
-
return LSolr.
|
109
|
+
return LSolr.new(field) if values.empty?
|
117
110
|
|
118
111
|
values.map { |v| build_query(field, v) }.reduce { |a, e| a.or(e) }.wrap
|
119
112
|
end
|