yoomee-mongosphinx 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -5,6 +5,9 @@ supporting MongoMapper to automatically index objects in Sphinx. It tries to
5
5
  act as transparent as possible: Just an additional method in MongoMapper
6
6
  and some Sphinx configuration are needed to get going.
7
7
 
8
+ == Yoomee Mongosphinx
9
+ Forked from burke/mongosphinx. Fixes some bugs and adds some other functionality
10
+ e.g. delta indexing.
8
11
 
9
12
  == Prerequisites
10
13
 
@@ -173,8 +173,7 @@ module MongoMapper # :nodoc:
173
173
  if self == Document
174
174
  client = Riddle::Client.new
175
175
  else
176
- client = Riddle::Client.new(fulltext_opts[:server],
177
- fulltext_opts[:port])
176
+ client = Riddle::Client.new(fulltext_opts[:server], fulltext_opts[:port])
178
177
  query = query + " @classname #{self}"
179
178
  end
180
179
 
@@ -193,13 +192,14 @@ module MongoMapper # :nodoc:
193
192
  client.sort_by = sort_by
194
193
  end
195
194
 
196
- index_names = "*"
197
- debugger
198
- if self != Document
199
- index_names = "#{self.to_s.underscore}_core"
200
- index_names += " #{self.to_s.underscore}_delta" if self.has_delta_index
195
+ index_names = ""
196
+ class_names = (self == Document ? options[:classes] || [] : [self.to_s])
197
+ class_names.each do |class_name|
198
+ class_name = class_name.to_s
199
+ index_names += "#{class_name.underscore}_core "
200
+ index_names += "#{class_name.underscore}_delta " if class_name.camelize.constantize.has_delta_index
201
201
  end
202
- debugger
202
+ index_names = "*" if index_names.blank?
203
203
  result = client.query(query, index_names)
204
204
 
205
205
  if result and result[:status] == 0 and !(sphinx_matches = result[:matches]).empty?
data/mongosphinx.rb CHANGED
@@ -11,7 +11,7 @@ require 'mongo_mapper'
11
11
  require 'riddle'
12
12
 
13
13
  module MongoSphinx
14
- if (match = __FILE__.match(/mongosphinx-([0-9.-]*)/))
14
+ if (match = __FILE__.match(/yoomee-mongosphinx-([0-9.-]*)/))
15
15
  VERSION = match[1]
16
16
  else
17
17
  VERSION = 'unknown'
metadata CHANGED
@@ -1,33 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yoomee-mongosphinx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Atkins
14
- - Burke Libbey
15
- - Ryan Neufeld
16
- - Joost Hietbrink
17
14
  autorequire:
18
15
  bindir: bin
19
16
  cert_chain: []
20
17
 
21
- date: 2010-08-16 00:00:00 +01:00
18
+ date: 2010-08-17 00:00:00 +01:00
22
19
  default_executable:
23
20
  dependencies: []
24
21
 
25
- description: MongoSphinx, a full text indexing extension for MongoDB using Sphinx, Yoomee fork from burke/master.
26
- email:
27
- - matt@yoomee.com
28
- - burke@53cr.com
29
- - ryan@53cr.com
30
- - joost@joopp.com
22
+ description:
23
+ email: matt@yoomee.com
31
24
  executables: []
32
25
 
33
26
  extensions: []