mwmitchell-rsolr-ext 0.7.10 → 0.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,11 @@ module RSolr::Ext::Request::Queryable
32
32
  return value.collect do |(k,v)|
33
33
  if v.is_a?(Range)
34
34
  "#{k}:#{build_range(v)}"
35
+ # If the value is an array, we want the same param, multiple times (not a query join)
36
+ elsif v.is_a?(Array)
37
+ v.collect do |vv|
38
+ "#{k}:#{build_query(vv, quote_string)}"
39
+ end
35
40
  else
36
41
  "#{k}:#{build_query(v, quote_string)}"
37
42
  end
data/lib/rsolr-ext.rb CHANGED
@@ -23,7 +23,7 @@ module RSolr
23
23
 
24
24
  module Ext
25
25
 
26
- VERSION = '0.7.10'
26
+ VERSION = '0.7.11'
27
27
 
28
28
  autoload :Request, 'rsolr-ext/request.rb'
29
29
  autoload :Response, 'rsolr-ext/response.rb'
data/rsolr-ext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rsolr-ext"
3
- s.version = "0.7.10"
3
+ s.version = "0.7.11"
4
4
  s.date = "2009-05-08"
5
5
  s.summary = "An extension lib for RSolr"
6
6
  s.email = "goodieboy@gmail.com"
data/test/request_test.rb CHANGED
@@ -25,10 +25,10 @@ class RSolrExtRequestTest < Test::Unit::TestCase
25
25
  test 'fq param using the phrase_filters mapping' do
26
26
  std = RSolr::Ext::Request::Standard.new
27
27
  solr_params = std.map(
28
- :phrase_filters=>[{:manu=>'Apple'}, {:color=>'red'}]
28
+ :phrase_filters=>{:manu=>['Apple', 'ASG'], :color=>['red', 'blue']}
29
29
  )
30
- assert solr_params[:fq].is_a?(Array)
31
- assert solr_params[:fq].first.is_a?(String)
30
+ expected = {:fq=>["color:\"red\"", "color:\"blue\"", "manu:\"Apple\"", "manu:\"ASG\""]}
31
+ assert expected, solr_params
32
32
  end
33
33
 
34
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mwmitchell-rsolr-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Mitchell