lsolr 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/lsolr.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4515726ee247a275e8909025ed9baf65125820168fa8bfdcf0b304958123f006
|
4
|
+
data.tar.gz: 6e565192d0b2a49ce376a2a7b17dbd11d696cdd2bb47d8846171ae7c5f9bfebf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d71accb2420552e9b85114211e08251d4ad499ce722b2bfca63378b4a2b49078342514d4da304a965dfa4f6cfb92ebfd3a2594c32c5d951375ab60a4fea0ea14
|
7
|
+
data.tar.gz: 27ffeadda84fb03ff6ff23562982682044322ce789911c2effd732e62b856d876fc84d4988340f821af5c1031c24c9188b96dc83a44fed9e54507e9367e0166b
|
data/lib/lsolr.rb
CHANGED
@@ -149,13 +149,10 @@ class LSolr
|
|
149
149
|
# Returns Apache Solr standard lucene type query string.
|
150
150
|
#
|
151
151
|
# @return [String] a stringified query
|
152
|
-
def to_s
|
152
|
+
def to_s
|
153
153
|
raise IncompleteQueryError, 'Please specify search field and value.' if blank?
|
154
154
|
|
155
|
-
|
156
|
-
expr = "#{expr_not}#{left_parentheses.join}#{expr}#{right_parentheses.join}"
|
157
|
-
expr = "#{prev} #{operator} #{expr}" if !prev.nil? && prev.present?
|
158
|
-
"#{expr}#{@boost}"
|
155
|
+
decorate_term_expr_if_needed(build_term_expr)
|
159
156
|
end
|
160
157
|
|
161
158
|
alias to_str to_s
|
@@ -444,4 +441,10 @@ class LSolr
|
|
444
441
|
"#{@field}:#{@value}"
|
445
442
|
end
|
446
443
|
end
|
444
|
+
|
445
|
+
def decorate_term_expr_if_needed(expr)
|
446
|
+
expr = "#{expr_not}#{left_parentheses.join}#{expr}#{right_parentheses.join}"
|
447
|
+
expr = "#{prev} #{operator} #{expr}" if !prev.nil? && prev.present?
|
448
|
+
"#{expr}#{@boost}"
|
449
|
+
end
|
447
450
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lsolr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taishi Kasuga
|
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
40
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.
|
41
|
+
rubygems_version: 2.7.4
|
42
42
|
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: A query builder of Apache Solr for Ruby
|