forked from burke/mongosphinx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmongosphinx.rb
executable file
·41 lines (34 loc) · 952 Bytes
/
mongosphinx.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# MongoSphinx, a full text indexing extension for using
# Sphinx.
#
# This file contains the includes implementing this library. Have a look at
# the README.rdoc as a starting point.
begin
require 'rubygems'
rescue LoadError; end
require 'mongo_mapper'
require 'riddle'
module MongoSphinx
if (match = __FILE__.match(/mongosphinx-([0-9.-]*)/))
VERSION = match[1]
else
VERSION = 'unknown'
end
end
require 'lib/multi_attribute'
require 'lib/indexer'
require 'lib/mixins/indexer'
require 'lib/mixins/properties'
# Include the Indexer mixin from the original Document class of
# MongoMapper which adds a few methods and allows calling method indexed_with.
module MongoMapper # :nodoc:
module Document # :nodoc:
include MongoMapper::Mixins::Indexer
module InstanceMethods
include MongoMapper::Mixins::Properties
end
module ClassMethods
include MongoMapper::Mixins::Indexer::ClassMethods
end
end
end