uri_service 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uri_service/client.rb +7 -0
- data/lib/uri_service/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: 26abbeab1aeb4f9af6f93bd2d12ae38544150881
|
4
|
+
data.tar.gz: ab29aac65bf065a1795e665e4ba36dee75211a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72bedd843f188bdfa169a072aa0fb6abac30b86ac54d3c6b04f52565e118a31102a825c74be5d4330eec35e60151da3f8235ffb60d9e99e04ba3beaade62a013
|
7
|
+
data.tar.gz: 25aa75d96f0f34f919459bad7bc33c5a38f90844bf0347d45f61d94737fe86100b390f48575ee6360410d322106ae2564a1deb986e83c7e37de485e965d95b33
|
data/lib/uri_service/client.rb
CHANGED
@@ -347,7 +347,14 @@ class UriService::Client
|
|
347
347
|
:start => start
|
348
348
|
}
|
349
349
|
|
350
|
+
if value_query.length < 3
|
351
|
+
# For efficiency, we only do whole term matches for queries < 3 characters
|
352
|
+
solr_params[:qf] = 'value_suggest'
|
353
|
+
solr_params[:pf] = 'value_suggest'
|
354
|
+
end
|
355
|
+
|
350
356
|
response = rsolr.get('suggest', params: solr_params)
|
357
|
+
|
351
358
|
if response['response']['numFound'] > 0
|
352
359
|
response['response']['docs'].each do |doc|
|
353
360
|
terms_to_return << term_solr_doc_to_frozen_term_hash(doc)
|
data/lib/uri_service/version.rb
CHANGED