customized-mongomapper-search 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,12 +2,12 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('customized-mongomapper-search', '0.1.1') do |p|
5
+ Echoe.new('customized-mongomapper-search', '0.1.2') do |p|
6
6
  p.description = "Easily integreate mongo mapper with enterprise search like solr. CUSTOMIZED to use a specified Solr URL in the model. Original mongomapper-search gem (version 0.1.0) was written by Fernando Meyer and can be found at http://github.com/fmeyer/mongomapper-search."
7
7
  p.url = "http://github.com/tsxn26/tsxn-mongomapper-search"
8
8
  p.author = ["Fernando Meyer", "Thomas Nguyen"]
9
9
  p.email = "tsxn26@gmail.com"
10
10
  p.ignore_pattern = ["tmp/*", "script/*"]
11
- p.runtime_dependencies = ["oauth-rsolr >=0.12.1", "mongo_mapper", "will_paginate >=2.3.11"]
11
+ p.runtime_dependencies = ["oauth-rsolr >=0.12.1", "mongo_mapper >=0.7.0", "will_paginate >=2.3.11"]
12
12
  p.development_dependencies = []
13
13
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{customized-mongomapper-search}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Fernando Meyer, Thomas Nguyen"]
9
- s.date = %q{2010-04-13}
9
+ s.date = %q{2010-04-14}
10
10
  s.description = %q{Easily integreate mongo mapper with enterprise search like solr. CUSTOMIZED to use a specified Solr URL in the model. Original mongomapper-search gem (version 0.1.0) was written by Fernando Meyer and can be found at http://github.com/fmeyer/mongomapper-search.}
11
11
  s.email = %q{tsxn26@gmail.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/customized-mongomapper-search.rb", "lib/search.rb"]
@@ -24,16 +24,16 @@ Gem::Specification.new do |s|
24
24
 
25
25
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
26
  s.add_runtime_dependency(%q<oauth-rsolr>, [">= 0.12.1"])
27
- s.add_runtime_dependency(%q<mongo_mapper>, [">= 0"])
27
+ s.add_runtime_dependency(%q<mongo_mapper>, [">= 0.7.0"])
28
28
  s.add_runtime_dependency(%q<will_paginate>, [">= 2.3.11"])
29
29
  else
30
30
  s.add_dependency(%q<oauth-rsolr>, [">= 0.12.1"])
31
- s.add_dependency(%q<mongo_mapper>, [">= 0"])
31
+ s.add_dependency(%q<mongo_mapper>, [">= 0.7.0"])
32
32
  s.add_dependency(%q<will_paginate>, [">= 2.3.11"])
33
33
  end
34
34
  else
35
35
  s.add_dependency(%q<oauth-rsolr>, [">= 0.12.1"])
36
- s.add_dependency(%q<mongo_mapper>, [">= 0"])
36
+ s.add_dependency(%q<mongo_mapper>, [">= 0.7.0"])
37
37
  s.add_dependency(%q<will_paginate>, [">= 2.3.11"])
38
38
  end
39
39
  end
data/lib/search.rb CHANGED
@@ -22,7 +22,7 @@ module Search::SolrDocument
22
22
  protected
23
23
  def search_engine_query(query, opts = {})
24
24
  opts.reverse_merge!(:limit => 20, :offset => 0)
25
- resp = @Solr.select(:q => query, :rows => opts[:limit], :start => opts[:offset], :qt => :dismax, :fl => '*,score')['response']
25
+ resp = @Solr.select(:q => query, :rows => opts[:limit], :start => opts[:offset], :qt => !opts[:qt].blank? ? opts[:qt] : "standard", :fl => '*,score')['response']
26
26
  return resp['docs'].map{|doc| find(doc['id'])}, resp['numFound']
27
27
  end
28
28
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Fernando Meyer, Thomas Nguyen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-13 00:00:00 -07:00
17
+ date: 2010-04-14 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -40,7 +40,9 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  segments:
42
42
  - 0
43
- version: "0"
43
+ - 7
44
+ - 0
45
+ version: 0.7.0
44
46
  type: :runtime
45
47
  version_requirements: *id002
46
48
  - !ruby/object:Gem::Dependency