freelancing-god-thinking-sphinx 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
data/README.textile
CHANGED
@@ -46,6 +46,7 @@ module ThinkingSphinx
|
|
46
46
|
ids = matches.collect { |match| match[:attributes]["sphinx_internal_id"] }
|
47
47
|
instances = ids.length > 0 ? klass.find(
|
48
48
|
:all,
|
49
|
+
:joins => options[:joins],
|
49
50
|
:conditions => {klass.primary_key.to_sym => ids},
|
50
51
|
:include => (options[:include] || index_options[:include]),
|
51
52
|
:select => (options[:select] || index_options[:select]),
|
@@ -31,8 +31,10 @@ module ThinkingSphinx
|
|
31
31
|
# fashion to database.yml - using the following keys: config_file,
|
32
32
|
# searchd_log_file, query_log_file, pid_file, searchd_file_path, port,
|
33
33
|
# allow_star, enable_star, min_prefix_len, min_infix_len, mem_limit,
|
34
|
-
# max_matches,
|
35
|
-
# html_strip,
|
34
|
+
# max_matches, morphology, charset_type, charset_table, ignore_chars,
|
35
|
+
# html_strip, html_remove_elements, delayed_job_priority.
|
36
|
+
#
|
37
|
+
# I think you've got the idea.
|
36
38
|
#
|
37
39
|
# Each setting in the YAML file is optional - so only put in the ones you
|
38
40
|
# want to change.
|
@@ -55,7 +57,8 @@ module ThinkingSphinx
|
|
55
57
|
|
56
58
|
attr_accessor :config_file, :searchd_log_file, :query_log_file,
|
57
59
|
:pid_file, :searchd_file_path, :address, :port, :allow_star,
|
58
|
-
:database_yml_file, :app_root, :bin_path, :model_directories
|
60
|
+
:database_yml_file, :app_root, :bin_path, :model_directories,
|
61
|
+
:delayed_job_priority
|
59
62
|
|
60
63
|
attr_accessor :source_options, :index_options
|
61
64
|
|
@@ -87,6 +90,7 @@ module ThinkingSphinx
|
|
87
90
|
self.bin_path = ""
|
88
91
|
self.model_directories = ["#{app_root}/app/models/"] +
|
89
92
|
Dir.glob("#{app_root}/vendor/plugins/*/app/models/")
|
93
|
+
self.delayed_job_priority = 0
|
90
94
|
|
91
95
|
self.source_options = {}
|
92
96
|
self.index_options = {
|
@@ -9,13 +9,15 @@ module ThinkingSphinx
|
|
9
9
|
class DelayedDelta < ThinkingSphinx::Deltas::DefaultDelta
|
10
10
|
def index(model, instance = nil)
|
11
11
|
ThinkingSphinx::Deltas::Job.enqueue(
|
12
|
-
ThinkingSphinx::Deltas::DeltaJob.new(delta_index_name(model))
|
12
|
+
ThinkingSphinx::Deltas::DeltaJob.new(delta_index_name(model)),
|
13
|
+
ThinkingSphinx::Configuration.instance.delayed_job_priority
|
13
14
|
)
|
14
15
|
|
15
16
|
Delayed::Job.enqueue(
|
16
17
|
ThinkingSphinx::Deltas::FlagAsDeletedJob.new(
|
17
18
|
core_index_name(model), instance.sphinx_document_id
|
18
|
-
)
|
19
|
+
),
|
20
|
+
ThinkingSphinx::Configuration.instance.delayed_job_priority
|
19
21
|
) if instance
|
20
22
|
|
21
23
|
true
|
data/lib/thinking_sphinx.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freelancing-god-thinking-sphinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-11 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|