friendlyfashion-thinking-sphinx 2.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +244 -0
- data/LICENCE +20 -0
- data/README.textile +235 -0
- data/features/abstract_inheritance.feature +10 -0
- data/features/alternate_primary_key.feature +27 -0
- data/features/attribute_transformation.feature +22 -0
- data/features/attribute_updates.feature +77 -0
- data/features/deleting_instances.feature +67 -0
- data/features/direct_attributes.feature +11 -0
- data/features/excerpts.feature +21 -0
- data/features/extensible_delta_indexing.feature +9 -0
- data/features/facets.feature +88 -0
- data/features/facets_across_model.feature +29 -0
- data/features/field_sorting.feature +18 -0
- data/features/handling_edits.feature +94 -0
- data/features/retry_stale_indexes.feature +24 -0
- data/features/searching_across_models.feature +20 -0
- data/features/searching_by_index.feature +40 -0
- data/features/searching_by_model.feature +175 -0
- data/features/searching_with_find_arguments.feature +56 -0
- data/features/sphinx_detection.feature +25 -0
- data/features/sphinx_scopes.feature +68 -0
- data/features/step_definitions/alpha_steps.rb +16 -0
- data/features/step_definitions/beta_steps.rb +7 -0
- data/features/step_definitions/common_steps.rb +201 -0
- data/features/step_definitions/extensible_delta_indexing_steps.rb +7 -0
- data/features/step_definitions/facet_steps.rb +96 -0
- data/features/step_definitions/find_arguments_steps.rb +36 -0
- data/features/step_definitions/gamma_steps.rb +15 -0
- data/features/step_definitions/scope_steps.rb +19 -0
- data/features/step_definitions/search_steps.rb +94 -0
- data/features/step_definitions/sphinx_steps.rb +35 -0
- data/features/sti_searching.feature +19 -0
- data/features/support/env.rb +27 -0
- data/features/support/lib/generic_delta_handler.rb +8 -0
- data/features/thinking_sphinx/database.example.yml +3 -0
- data/features/thinking_sphinx/db/.gitignore +1 -0
- data/features/thinking_sphinx/db/fixtures/alphas.rb +8 -0
- data/features/thinking_sphinx/db/fixtures/authors.rb +1 -0
- data/features/thinking_sphinx/db/fixtures/betas.rb +11 -0
- data/features/thinking_sphinx/db/fixtures/boxes.rb +9 -0
- data/features/thinking_sphinx/db/fixtures/categories.rb +1 -0
- data/features/thinking_sphinx/db/fixtures/cats.rb +3 -0
- data/features/thinking_sphinx/db/fixtures/comments.rb +24 -0
- data/features/thinking_sphinx/db/fixtures/developers.rb +31 -0
- data/features/thinking_sphinx/db/fixtures/dogs.rb +3 -0
- data/features/thinking_sphinx/db/fixtures/extensible_betas.rb +10 -0
- data/features/thinking_sphinx/db/fixtures/foxes.rb +3 -0
- data/features/thinking_sphinx/db/fixtures/gammas.rb +10 -0
- data/features/thinking_sphinx/db/fixtures/music.rb +4 -0
- data/features/thinking_sphinx/db/fixtures/people.rb +1001 -0
- data/features/thinking_sphinx/db/fixtures/post_keywords.txt +1 -0
- data/features/thinking_sphinx/db/fixtures/posts.rb +10 -0
- data/features/thinking_sphinx/db/fixtures/robots.rb +8 -0
- data/features/thinking_sphinx/db/fixtures/tags.rb +27 -0
- data/features/thinking_sphinx/db/migrations/create_alphas.rb +8 -0
- data/features/thinking_sphinx/db/migrations/create_animals.rb +5 -0
- data/features/thinking_sphinx/db/migrations/create_authors.rb +3 -0
- data/features/thinking_sphinx/db/migrations/create_authors_posts.rb +6 -0
- data/features/thinking_sphinx/db/migrations/create_betas.rb +5 -0
- data/features/thinking_sphinx/db/migrations/create_boxes.rb +5 -0
- data/features/thinking_sphinx/db/migrations/create_categories.rb +3 -0
- data/features/thinking_sphinx/db/migrations/create_comments.rb +10 -0
- data/features/thinking_sphinx/db/migrations/create_developers.rb +7 -0
- data/features/thinking_sphinx/db/migrations/create_extensible_betas.rb +5 -0
- data/features/thinking_sphinx/db/migrations/create_gammas.rb +3 -0
- data/features/thinking_sphinx/db/migrations/create_genres.rb +3 -0
- data/features/thinking_sphinx/db/migrations/create_music.rb +6 -0
- data/features/thinking_sphinx/db/migrations/create_people.rb +13 -0
- data/features/thinking_sphinx/db/migrations/create_posts.rb +6 -0
- data/features/thinking_sphinx/db/migrations/create_robots.rb +4 -0
- data/features/thinking_sphinx/db/migrations/create_taggings.rb +5 -0
- data/features/thinking_sphinx/db/migrations/create_tags.rb +4 -0
- data/features/thinking_sphinx/models/alpha.rb +23 -0
- data/features/thinking_sphinx/models/andrew.rb +17 -0
- data/features/thinking_sphinx/models/animal.rb +5 -0
- data/features/thinking_sphinx/models/author.rb +3 -0
- data/features/thinking_sphinx/models/beta.rb +13 -0
- data/features/thinking_sphinx/models/box.rb +8 -0
- data/features/thinking_sphinx/models/cat.rb +3 -0
- data/features/thinking_sphinx/models/category.rb +4 -0
- data/features/thinking_sphinx/models/comment.rb +10 -0
- data/features/thinking_sphinx/models/developer.rb +21 -0
- data/features/thinking_sphinx/models/dog.rb +3 -0
- data/features/thinking_sphinx/models/extensible_beta.rb +9 -0
- data/features/thinking_sphinx/models/fox.rb +5 -0
- data/features/thinking_sphinx/models/gamma.rb +5 -0
- data/features/thinking_sphinx/models/genre.rb +3 -0
- data/features/thinking_sphinx/models/medium.rb +5 -0
- data/features/thinking_sphinx/models/music.rb +10 -0
- data/features/thinking_sphinx/models/person.rb +24 -0
- data/features/thinking_sphinx/models/post.rb +22 -0
- data/features/thinking_sphinx/models/robot.rb +12 -0
- data/features/thinking_sphinx/models/tag.rb +3 -0
- data/features/thinking_sphinx/models/tagging.rb +4 -0
- data/lib/cucumber/thinking_sphinx/external_world.rb +12 -0
- data/lib/cucumber/thinking_sphinx/internal_world.rb +137 -0
- data/lib/cucumber/thinking_sphinx/sql_logger.rb +28 -0
- data/lib/thinking-sphinx.rb +1 -0
- data/lib/thinking_sphinx/action_controller.rb +31 -0
- data/lib/thinking_sphinx/active_record/attribute_updates.rb +53 -0
- data/lib/thinking_sphinx/active_record/collection_proxy.rb +47 -0
- data/lib/thinking_sphinx/active_record/collection_proxy_with_scopes.rb +27 -0
- data/lib/thinking_sphinx/active_record/delta.rb +67 -0
- data/lib/thinking_sphinx/active_record/has_many_association.rb +44 -0
- data/lib/thinking_sphinx/active_record/has_many_association_with_scopes.rb +21 -0
- data/lib/thinking_sphinx/active_record/log_subscriber.rb +61 -0
- data/lib/thinking_sphinx/active_record/scopes.rb +110 -0
- data/lib/thinking_sphinx/active_record.rb +386 -0
- data/lib/thinking_sphinx/adapters/abstract_adapter.rb +87 -0
- data/lib/thinking_sphinx/adapters/mysql_adapter.rb +62 -0
- data/lib/thinking_sphinx/adapters/postgresql_adapter.rb +188 -0
- data/lib/thinking_sphinx/association.rb +230 -0
- data/lib/thinking_sphinx/attribute.rb +405 -0
- data/lib/thinking_sphinx/auto_version.rb +40 -0
- data/lib/thinking_sphinx/bundled_search.rb +44 -0
- data/lib/thinking_sphinx/class_facet.rb +20 -0
- data/lib/thinking_sphinx/configuration.rb +375 -0
- data/lib/thinking_sphinx/context.rb +76 -0
- data/lib/thinking_sphinx/core/string.rb +15 -0
- data/lib/thinking_sphinx/deltas/default_delta.rb +62 -0
- data/lib/thinking_sphinx/deltas.rb +28 -0
- data/lib/thinking_sphinx/deploy/capistrano.rb +99 -0
- data/lib/thinking_sphinx/excerpter.rb +23 -0
- data/lib/thinking_sphinx/facet.rb +135 -0
- data/lib/thinking_sphinx/facet_search.rb +170 -0
- data/lib/thinking_sphinx/field.rb +98 -0
- data/lib/thinking_sphinx/index/builder.rb +315 -0
- data/lib/thinking_sphinx/index/faux_column.rb +118 -0
- data/lib/thinking_sphinx/index.rb +159 -0
- data/lib/thinking_sphinx/join.rb +37 -0
- data/lib/thinking_sphinx/property.rb +187 -0
- data/lib/thinking_sphinx/railtie.rb +43 -0
- data/lib/thinking_sphinx/search.rb +1061 -0
- data/lib/thinking_sphinx/search_methods.rb +439 -0
- data/lib/thinking_sphinx/sinatra.rb +7 -0
- data/lib/thinking_sphinx/source/internal_properties.rb +51 -0
- data/lib/thinking_sphinx/source/sql.rb +174 -0
- data/lib/thinking_sphinx/source.rb +194 -0
- data/lib/thinking_sphinx/tasks.rb +142 -0
- data/lib/thinking_sphinx/test.rb +55 -0
- data/lib/thinking_sphinx/version.rb +3 -0
- data/lib/thinking_sphinx.rb +297 -0
- data/spec/fixtures/data.sql +32 -0
- data/spec/fixtures/database.yml.default +3 -0
- data/spec/fixtures/models.rb +164 -0
- data/spec/fixtures/structure.sql +146 -0
- data/spec/spec_helper.rb +61 -0
- data/spec/sphinx_helper.rb +60 -0
- data/spec/support/rails.rb +25 -0
- data/spec/thinking_sphinx/active_record/delta_spec.rb +122 -0
- data/spec/thinking_sphinx/active_record/has_many_association_spec.rb +173 -0
- data/spec/thinking_sphinx/active_record/scopes_spec.rb +176 -0
- data/spec/thinking_sphinx/active_record_spec.rb +573 -0
- data/spec/thinking_sphinx/adapters/abstract_adapter_spec.rb +145 -0
- data/spec/thinking_sphinx/association_spec.rb +250 -0
- data/spec/thinking_sphinx/attribute_spec.rb +552 -0
- data/spec/thinking_sphinx/auto_version_spec.rb +103 -0
- data/spec/thinking_sphinx/configuration_spec.rb +326 -0
- data/spec/thinking_sphinx/context_spec.rb +126 -0
- data/spec/thinking_sphinx/core/array_spec.rb +9 -0
- data/spec/thinking_sphinx/core/string_spec.rb +9 -0
- data/spec/thinking_sphinx/excerpter_spec.rb +49 -0
- data/spec/thinking_sphinx/facet_search_spec.rb +176 -0
- data/spec/thinking_sphinx/facet_spec.rb +359 -0
- data/spec/thinking_sphinx/field_spec.rb +127 -0
- data/spec/thinking_sphinx/index/builder_spec.rb +532 -0
- data/spec/thinking_sphinx/index/faux_column_spec.rb +36 -0
- data/spec/thinking_sphinx/index_spec.rb +189 -0
- data/spec/thinking_sphinx/search_methods_spec.rb +156 -0
- data/spec/thinking_sphinx/search_spec.rb +1455 -0
- data/spec/thinking_sphinx/source_spec.rb +267 -0
- data/spec/thinking_sphinx/test_spec.rb +20 -0
- data/spec/thinking_sphinx_spec.rb +204 -0
- metadata +524 -0
data/HISTORY
ADDED
@@ -0,0 +1,244 @@
|
|
1
|
+
Edge:
|
2
|
+
* Use BasicObject instead of BlankSlate when running on 1.9 (Steve Purcell).
|
3
|
+
* Use full query in excerpts so double-stemming of terms is avoided (Jason Rust).
|
4
|
+
* Fix thinking_sphinx:version rake task.
|
5
|
+
* Directly compare non-string non-nil facet values for facet filters.
|
6
|
+
* Don't bother checking with Sphinx whether documents exist when trying to update them. We're catching failures already (and Sphinx usually doesn't care anyway).
|
7
|
+
|
8
|
+
2.0.13 - August 10th 2012
|
9
|
+
* 1.4.13 changes.
|
10
|
+
|
11
|
+
2.0.12 - May 14th 2012
|
12
|
+
* STI fix when generating WHERE clauses for sql_query.
|
13
|
+
* 1.4.12 changes.
|
14
|
+
|
15
|
+
2.0.11 - January 2nd 2012
|
16
|
+
* Call #all on search results to force population of results, matching ActiveRecord::Relation#all in essence. (Adrian Macneil).
|
17
|
+
* 1.4.11 changes.
|
18
|
+
|
19
|
+
2.0.10 - November 4th 2011
|
20
|
+
* 1.4.10 changes.
|
21
|
+
|
22
|
+
2.0.9 - October 10th 2011
|
23
|
+
* 1.4.9 changes (fixed invalid gemspec).
|
24
|
+
|
25
|
+
2.0.8 - October 10th 2011
|
26
|
+
* Actually looking at Rails engines paths for models (Eduardo Casanova).
|
27
|
+
* Ensuring associations for acts-as-taggable-on are tweaked for Rails 3.1 (Anthony).
|
28
|
+
* Bug fix for association collection proxies in Rails 3.1 (Pavel Forkert).
|
29
|
+
* References all known Rails model paths - better for Rails 3 Engines.
|
30
|
+
* Don't reload I18n anymore - the load order isn't an issue in Rails 3 or 3.1.
|
31
|
+
* Fixing attribute source queries for Rails 3.1.
|
32
|
+
* 1.4.8 changes
|
33
|
+
|
34
|
+
2.0.7 - August 29th 2011
|
35
|
+
* Making sure lib directory is actually a part of the gem. Oops.
|
36
|
+
|
37
|
+
2.0.6 - August 28th 2011
|
38
|
+
* Don't change superclass index definitions (otherwise sibling subclasses can end up with each others' index definitions).
|
39
|
+
* Improved scope support (Andrew White).
|
40
|
+
* Fixed association-filtered searches for Rails 3.1 (Andrew White).
|
41
|
+
* Fixed polymorphic association support for Rails 3.1 (Jonathan Viney).
|
42
|
+
* 1.4.7 changes.
|
43
|
+
|
44
|
+
2.0.5 - May 25th 2011
|
45
|
+
* Railtie equivalent for Sinatra.
|
46
|
+
* Rails 3.1 support (Florent Piteau).
|
47
|
+
* 1.4.6 changes.
|
48
|
+
|
49
|
+
2.0.4 - May 12th 2011
|
50
|
+
* Only determine Sphinx version when initializing Thinking Sphinx, instead of upon require.
|
51
|
+
* Still execute logged blocks for searching even when logging isn't enabled.
|
52
|
+
* 1.4.5 changes.
|
53
|
+
|
54
|
+
2.0.3 - April 3rd 2011
|
55
|
+
* 1.4.4 changes.
|
56
|
+
|
57
|
+
2.0.2 - January 13th 2011
|
58
|
+
* Improvement to loading the environment via Rake (Brenton Fletcher).
|
59
|
+
* 1.4.2 changes.
|
60
|
+
* 1.4.1 changes.
|
61
|
+
|
62
|
+
2.0.1 - November 19th 2011
|
63
|
+
* Intermittent as_json bug fix.
|
64
|
+
* Using Rails 3 logging system (Stephen Celis).
|
65
|
+
* Fixes for Rails 3.0.2 (Ivan Ukhov).
|
66
|
+
|
67
|
+
2.0.0 - November 14th 2011
|
68
|
+
* Handle has_many conditions defined as a hash (Artem Orlov).
|
69
|
+
* Deprecation fixes for logging (Anton Sozontov).
|
70
|
+
* Only load Thinking Sphinx if ActiveRecord is loaded (Matthew Higgins).
|
71
|
+
* Rails 3 support.
|
72
|
+
* 1.4.0 changes.
|
73
|
+
|
74
|
+
1.4.13 - August 10th 2012
|
75
|
+
* Sphinx 2.0.5 support.
|
76
|
+
* Hard retries for Sphinx exceptions (Andrew Hunter).
|
77
|
+
* Add support for association-filtered faceting (Andrew White).
|
78
|
+
* Cast PostgreSQL timestamps to their floored integers (instead of rounding up).
|
79
|
+
* Don't add array_accum to PostgreSQL v80311 (8.3.?) or newer.
|
80
|
+
|
81
|
+
1.4.12 - May 14th 2012
|
82
|
+
* Updating Riddle references to 1.5.2.
|
83
|
+
* Can explicitly specify available types for STI tables instead of automatically discovering them with "SELECT DISTINCT type FROM <table>" (Cedric Maion).
|
84
|
+
* Don't try to run rake tasks for Capistrano if there's no Rakefile - eg. on fresh deploys (Nathan Smith).
|
85
|
+
* Populate search results before comparing with #==.
|
86
|
+
* Can indicate whether Sphinx should use a socket for connections instead of TCP (Simon Hürlimann).
|
87
|
+
* Can have just attribute values returned as search results using `:attributes_only => true` in a search call (Andrew Hunter).
|
88
|
+
* Can specify additional local indices for the generated distributed index (usually one per model) (Andrew Hunter).
|
89
|
+
* Supporting Sphinx 2.0.4 (Ilia Lobsanov).
|
90
|
+
* Load MySQL SSL settings from database.yml (James Brooks).
|
91
|
+
* Adding Sphinx 2.0.3 support (identical to 2.1.0).
|
92
|
+
* Dropping Rails 1.2 and 2.0.x support.
|
93
|
+
* Association keys now are the association stacks as arrays - more reliable in Rubinius.
|
94
|
+
* Can now determine PostgreSQL versions with JRuby.
|
95
|
+
* Many testing tweaks.
|
96
|
+
* Allow for rank_expr option being passed through to Riddle.
|
97
|
+
|
98
|
+
1.4.11 - January 2nd 2012
|
99
|
+
* Handle no results for total_pages and total_entries with defaults of 0.
|
100
|
+
* No longer shuffle Sphinx addresses by default.
|
101
|
+
* Fix coalescing of non-char values in PostgreSQL (Matthew Barnett).
|
102
|
+
* Default database user for Sphinx configuration is now ENV['USER'], not root.
|
103
|
+
* Alias offset to offset_value for Kaminari.
|
104
|
+
* Sphinx 2.1.0-dev support.
|
105
|
+
|
106
|
+
1.4.10 - November 4th 2011
|
107
|
+
* Updating Riddle references for impending 1.5.0 release of Riddle.
|
108
|
+
* Handle out-of-date indexed_models references.
|
109
|
+
* Fixing STI model handling during context index loading (Kenn Ejima).
|
110
|
+
|
111
|
+
1.4.9 - October 10th 2011
|
112
|
+
* Fixing invalid gemspec.
|
113
|
+
|
114
|
+
1.4.8 - October 10th 2011
|
115
|
+
* Adding smart default (id) for primary key column name.
|
116
|
+
* Making error message when daemon fails to start a little more helpful (Tony Pitale).
|
117
|
+
* Adding ThinkingSphinx::Search#last_page? for Kaminari (Pete Deffendol).
|
118
|
+
* If ENV['NODETACH'] is set when calling ts:start, pass that flag through to Riddle to start Sphinx in the foreground (Aaron Gibralter).
|
119
|
+
* Catch and report all errors when models are loaded (Martin Gordon).
|
120
|
+
* Bringing in builder gem's BlankSlate for our Builder - better at keeping global Rake methods out of the way.
|
121
|
+
* Use PostgreSQL's array_agg function if it exists, instead of array_accum (PG v8.4 or newer).
|
122
|
+
* Shuffle multiple Sphinx addresses by default, but allow that to be turned off (Ngan Pham).
|
123
|
+
* Fix string attributes when using Sphinx 2.0.1 and bin_path.
|
124
|
+
|
125
|
+
1.4.7 - August 28th 2011
|
126
|
+
* Don't search for objects when updating attributes on every save - if the object isn't there, then the error will be caught anyway.
|
127
|
+
* Extra flexibility for association attribute references (Andrew White).
|
128
|
+
* Setting up test suite for Travis, and fixing tests across many rubies.
|
129
|
+
* Removing test for filtering on wordcount attribute - seems Sphinx doesn't like that.
|
130
|
+
* If many indices are searched on, only use the first for excerpts.
|
131
|
+
* Allow MVA facets from SQL strings that are all integers to skip object translation.
|
132
|
+
* Adding total_count method for better Kaminari support (Dan Pickett).
|
133
|
+
* Switching from Jeweler to Bundler for gem management.
|
134
|
+
* Cleaning up Context - re-using camelized class names.
|
135
|
+
* Simplified auto-star regex for 1.9 - no need to set the unicode flag.
|
136
|
+
* Don't update sphinx_internal_id attribute when updating a record's attributes.
|
137
|
+
* Ignore empty arrays for :without_ids (Jason Rust).
|
138
|
+
* Now catching Riddle::ResponseError when we aren't fussed about the responses from Sphinx.
|
139
|
+
* Distinguishing between Ruby 1.8 and 1.9 for auto-star regex (Andrew White).
|
140
|
+
* Don't re-index at the end of suspended_delta calls if requested.
|
141
|
+
* Adding stop_timeout setting to configure how long ts:stop should wait while checking whether Sphinx has stopped (Justin Tanner).
|
142
|
+
* Speed improvement for types_to_crcs (Josh Goebel).
|
143
|
+
* Adding a touched_reindex_file option, for a file that will be touched after indices are rotated (Rémi Prévost).
|
144
|
+
* Better support for the Mysql2 adapter (Andrew White).
|
145
|
+
* More pagination methods - next_page? and first_page?.
|
146
|
+
* Adding use_64_bit option to ensure all timestamp attributes are treated as 64 bit integers (Andrey Deryabin).
|
147
|
+
* Simpler, less brittle support for all Sphinx settings via Riddle (Clemens Kofler).
|
148
|
+
* Optimised start/stop behaviour in Capistrano recipe (Lars Weiler).
|
149
|
+
* Catch and ignore timeout errors for low priority requests.
|
150
|
+
* Don't double up on de-polymorphised associations for generated Sphinx source SQL queries.
|
151
|
+
|
152
|
+
1.4.6 - May 25th 2011
|
153
|
+
* Require Riddle 1.3.3 or better.
|
154
|
+
* Cast Sphinx document ids to 32bit integers to keep PostgreSQL happy when Sphinx is compiled for id64 support (Bruno Santschi).
|
155
|
+
* Making sure suspended_delta always exists on indexed models, whether indices have been defined or not.
|
156
|
+
* Workaround for ActsAsTaggableOn to ensure association joins work.
|
157
|
+
* Use Sphinx string attributes instead of class_crc integers to determine which class each search result is from (Sphinx 2.x or newer).
|
158
|
+
* String attribute support - and so, using this instead of str2ordinal for string sorting.
|
159
|
+
* Support for fields with paired string attributes and wordcount attributes (Sphinx 1.10-beta or newer).
|
160
|
+
* Support for file fields (Sphinx 1.10-beta or newer).
|
161
|
+
* Wordcount attribute support (Sphinx 1.10-beta or newer).
|
162
|
+
* Sinatra support is only used when Rails isn't loaded.
|
163
|
+
* Sphinx 2.0.x (including 2.0.2-dev) support.
|
164
|
+
* :without_any filtering option (the reverse of :with_all).
|
165
|
+
|
166
|
+
1.4.5 - May 12th 2011
|
167
|
+
* Require Riddle 1.3.2 or better.
|
168
|
+
* Improved 1.9.2 support
|
169
|
+
* Don't hack Array - make ThinkingSphinx::Search a subclass of Array instead.
|
170
|
+
* Distinguishing between suspended deltas and disabled deltas.
|
171
|
+
* Removing most Thread references, opting for Mutexes for better multi-threading support.
|
172
|
+
* Added support for client_key to allow for authenticated Sphinx communication.
|
173
|
+
* Sphinx 2.0.1 support.
|
174
|
+
* Don't try to translate nil values (Alex Chee).
|
175
|
+
* Performance fix for facets (Clemens Kofler).
|
176
|
+
* Use Sphinx 0.9.9 in Capistrano recipe (Konstantin Shabanov).
|
177
|
+
* Sinatra support (Patrick Tulskie).
|
178
|
+
* Offer sanitize_sql method within define_index blocks (Matt Todd).
|
179
|
+
* Performance fix: caching primary_key_for_sphinx value.
|
180
|
+
|
181
|
+
1.4.4 - April 3 2011
|
182
|
+
* Being consistent with === comparisons for Array monkeypatch.
|
183
|
+
* Kaminari pagination support.
|
184
|
+
* Ensure deltas are supported across multiple indices for a given model.
|
185
|
+
* Use custom index names for excerpts calls if that's what exists (Javier Ramírez).
|
186
|
+
* Allow for Sphinx versions compiled from source (Greg Weber).
|
187
|
+
* Ensuring thread is being required to allow Mutexes to work.
|
188
|
+
* Ensure primary_key_for_sphinx is inherited to subclasses (Robert Stern).
|
189
|
+
* Don't complain if there's an error when checking for documents in a given index.
|
190
|
+
|
191
|
+
1.4.3 - January 29th 2011
|
192
|
+
* Don't memoize the database adapter.
|
193
|
+
* Allow queries to just return specific attributes via the :only option, instead of ActiveRecord objects (Hans Hasselberg).
|
194
|
+
* Performance fix: Only add sphinx scopes to has_many associations if there are scopes in play (Kirill Maximov).
|
195
|
+
* Fixing CRC32 function for PostgreSQL to handle UTF characters that use more than one byte.
|
196
|
+
|
197
|
+
1.4.2 - January 13th 2011
|
198
|
+
* Ignore Sphinx errors when updating attributes (it's a low priority request).
|
199
|
+
* Don't use the CRC32 function within the generated SQL queries for class types.
|
200
|
+
* Direct facets to use a method to translate values using :value.
|
201
|
+
* Ensure that if one sphinx_internal_id attribute is a bigint, they all are.
|
202
|
+
* Ignore Sphinx errors when marking documents as deleted (it's a low priority request).
|
203
|
+
* Don't select columns from polymorphic joins if they're not available.
|
204
|
+
* Don't query Sphinx for a facet request if zero facets are requested.
|
205
|
+
* Ensure we're only using local_options when it's available (Paul Schyska).
|
206
|
+
* Don't presume the environment for Capistrano is production (Robert Glaser).
|
207
|
+
* Allow for custom database adapters.
|
208
|
+
* Fix for custom delta columns (Marcin Stecki).
|
209
|
+
|
210
|
+
1.4.1 - December 21st 2010
|
211
|
+
* No longer looking for attributes in :conditions option when searching.
|
212
|
+
* Copy and then modify sort arguments.
|
213
|
+
* Allow the generation of Sphinx configuration objects without necessarily writing to the configuration file.
|
214
|
+
* Allow Sphinx 1.10-beta versions that have been compiled with id64 support.
|
215
|
+
* Raise Sphinx errors when searching - which can be ignored using the :ignore_errors option (Matt Todd).
|
216
|
+
* Handle complex :include arguments, including hashes within arrays (Paco Guzmán).
|
217
|
+
* Handle hashes passed through to :include when searching.
|
218
|
+
* Can now require either 'thinking_sphinx' or 'thinking-sphinx'.
|
219
|
+
* Excerpts are less fussy about inputs.
|
220
|
+
* No longer hard-coding RSpec colour setting - that's up to the developer.
|
221
|
+
* Require Riddle 1.2.0 or better.
|
222
|
+
* Use searchd to stop Sphinx (via --stop or --stopwait arguments) (Matt Todd).
|
223
|
+
|
224
|
+
1.4.0 - November 14th 2010
|
225
|
+
* No longer supporting attributes in :conditions option.
|
226
|
+
* Case insensitive field sorting if :sortable is set to :insensitive.
|
227
|
+
* Using Bundler for development
|
228
|
+
* Can use make facet requests on existing searches and Sphinx scopes.
|
229
|
+
* Don't star field markers in search queries.
|
230
|
+
* Can use search_for_ids on Sphinx scopes.
|
231
|
+
* Ensure the CRC32 function for PostgreSQL handles empty strings and NULLs.
|
232
|
+
* Allow custom determination for database adapters.
|
233
|
+
* :include search option now limits itself to the relevant classes when searching across more than one class.
|
234
|
+
* Don't memoize primary_key_for_sphinx, which was causing trouble when objects are deleted or frozen.
|
235
|
+
* Allow for excerpts options when searching (using :excerpt_options) (Lee Capps).
|
236
|
+
* Wrap UTC in quotes when setting the timezone in PostgreSQL (Keith Pitt).
|
237
|
+
* Don't colourize logs unless ActiveRecord allows for it.
|
238
|
+
* Consistent contribution documentation (Sam Goldstein).
|
239
|
+
* Allow the setting of Riddle's timeout value via sphinx.yml (Sam Goldstein).
|
240
|
+
* 1.10-beta support.
|
241
|
+
* Can set the riddle client for the search request using :client.
|
242
|
+
* Fixing default sphinx scope support.
|
243
|
+
* Make a reasonable attempt to check that Sphinx has stopped (Matt Todd).
|
244
|
+
* Be more verbose if a model can't be loaded by Thinking Sphinx.
|
data/LICENCE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 Pat Allan
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.textile
ADDED
@@ -0,0 +1,235 @@
|
|
1
|
+
h1. Thinking Sphinx
|
2
|
+
|
3
|
+
Please note: this is the branch for Rails 3. At some point in the near future, it will be released as Thinking Sphinx 2.0. It does not work with versions of Rails before v3 - I'm not sure if that'll happen in the future, but was just too much hassle right now.
|
4
|
+
|
5
|
+
If you want to give this a spin, clone the repo, check out the rails3 branch, and run @rake build@ to generate the gem.
|
6
|
+
|
7
|
+
h2. Usage
|
8
|
+
|
9
|
+
First, if you haven't done so already, check out the main "usage":http://ts.freelancing-gods.com/usage.html page. Once you've done that, the next place to look for information is the specific method docs - ThinkingSphinx::Search and ThinkingSphinx::Index::Builder in particular.
|
10
|
+
|
11
|
+
Keep in mind that while Thinking Sphinx works for ActiveRecord with Merb, it doesn't yet support DataMapper (although that is planned).
|
12
|
+
|
13
|
+
h2. Contributing
|
14
|
+
|
15
|
+
Fork on GitHub and after you've committed tested patches, send a pull request.
|
16
|
+
|
17
|
+
To quickly see if your system is ready to run the thinking sphinx specs, run the contribute.rb script found in the project root directory. Use the following instructions to install any missing requirements.
|
18
|
+
|
19
|
+
To get the spec suite running, you will need to install the ginger gem:
|
20
|
+
|
21
|
+
<pre><code>sudo gem install ginger --source http://gemcutter.org</code></pre>
|
22
|
+
|
23
|
+
Then install the cucumber, yard, jeweler and rspec gems. Make sure you have a git install version 1.6.0.0 or higher, otherwise the jeweler gem won't install. Bluecloth is required for some of the yard documentation.
|
24
|
+
|
25
|
+
<pre>
|
26
|
+
sudo gem install bluecloth cucumber yard jeweler rspec
|
27
|
+
</pre>
|
28
|
+
|
29
|
+
Then set up your database:
|
30
|
+
|
31
|
+
<pre>
|
32
|
+
cp spec/fixtures/database.yml.default spec/fixtures/database.yml &&
|
33
|
+
mysqladmin -u root create thinking_sphinx
|
34
|
+
</pre>
|
35
|
+
|
36
|
+
This last step can be done automatically by the contribute.rb script if all dependencies are met.
|
37
|
+
|
38
|
+
Make sure you don't have another Sphinx daemon (searchd) running. If you do, quit it with "rake ts:stop"
|
39
|
+
in the app root.
|
40
|
+
|
41
|
+
You should now have a passing test suite from which to build your patch on.
|
42
|
+
|
43
|
+
<pre>
|
44
|
+
rake spec
|
45
|
+
</pre>
|
46
|
+
|
47
|
+
If you get the message "Failed to start searchd daemon", run the spec with sudo:
|
48
|
+
|
49
|
+
<pre>
|
50
|
+
sudo rake spec
|
51
|
+
</pre>
|
52
|
+
|
53
|
+
If you quit the spec suite before it's completed, you may be left with data in the test
|
54
|
+
database, causing the next run to have failures. Let that run complete and then try again.
|
55
|
+
|
56
|
+
h2. Contributors
|
57
|
+
|
58
|
+
Since I first released this library, there's been quite a few people who have submitted patches, to my immense gratitude. Others have suggested syntax changes and general improvements. So my thanks to the following people:
|
59
|
+
|
60
|
+
* Joost Hietbrink
|
61
|
+
* Jonathan Conway
|
62
|
+
* Gregory Mirzayantz
|
63
|
+
* Tung Nguyen
|
64
|
+
* Sean Cribbs
|
65
|
+
* Benoit Caccinolo
|
66
|
+
* John Barton
|
67
|
+
* Oliver Beddows
|
68
|
+
* Arthur Zapparoli
|
69
|
+
* Dusty Doris
|
70
|
+
* Marcus Crafter
|
71
|
+
* Patrick Lenz
|
72
|
+
* Björn Andreasson
|
73
|
+
* James Healy
|
74
|
+
* Jae-Jun Hwang
|
75
|
+
* Xavier Shay
|
76
|
+
* Jason Rust
|
77
|
+
* Gopal Patel
|
78
|
+
* Chris Heald
|
79
|
+
* Peter Vandenberk
|
80
|
+
* Josh French
|
81
|
+
* Andrew Bennett
|
82
|
+
* Jordan Fowler
|
83
|
+
* Seth Walker
|
84
|
+
* Joe Noon
|
85
|
+
* Wolfgang Postler
|
86
|
+
* Rick Olson
|
87
|
+
* Killian Murphy
|
88
|
+
* Morten Primdahl
|
89
|
+
* Ryan Bates
|
90
|
+
* David Eisinger
|
91
|
+
* Shay Arnett
|
92
|
+
* Minh Tran
|
93
|
+
* Jeremy Durham
|
94
|
+
* Piotr Sarnacki
|
95
|
+
* Matt Johnson
|
96
|
+
* Nicolas Blanco
|
97
|
+
* Max Lapshin
|
98
|
+
* Josh Natanson
|
99
|
+
* Philip Hallstrom
|
100
|
+
* Christian Rishøj
|
101
|
+
* Mike Flester
|
102
|
+
* Jim Remsik
|
103
|
+
* Kennon Ballou
|
104
|
+
* Henrik Nyh
|
105
|
+
* Emil Tin
|
106
|
+
* Doug Cole
|
107
|
+
* Ed Hickey
|
108
|
+
* Evan Weaver
|
109
|
+
* Thibaut Barrere
|
110
|
+
* Kristopher Chambers
|
111
|
+
* Dmitrij Smalko
|
112
|
+
* Aleksey Yeschenko
|
113
|
+
* Lachie Cox
|
114
|
+
* Lourens Naude
|
115
|
+
* Tom Davies
|
116
|
+
* Dan Pickett
|
117
|
+
* Alex Caudill
|
118
|
+
* Jim Benton
|
119
|
+
* John Aughey
|
120
|
+
* Keith Pitty
|
121
|
+
* Jeff Talbot
|
122
|
+
* Dana Contreras
|
123
|
+
* Menno van der Sman
|
124
|
+
* Bill Harding
|
125
|
+
* Isaac Feliu
|
126
|
+
* Andrei Bocan
|
127
|
+
* László Bácsi
|
128
|
+
* Peter Wagenet
|
129
|
+
* Martin Emde
|
130
|
+
* David Wennergren
|
131
|
+
* Mark Lane
|
132
|
+
* Eric Lindvall
|
133
|
+
* Lawrence Pit
|
134
|
+
* Mike Bailey
|
135
|
+
* Bill Leeper
|
136
|
+
* Michael Reinsch
|
137
|
+
* Anderson Dias
|
138
|
+
* Jerome Riga
|
139
|
+
* Tien Dung
|
140
|
+
* Johannes Kaefer
|
141
|
+
* Paul Campbell
|
142
|
+
* Matthew Beale
|
143
|
+
* Tom Simnett
|
144
|
+
* Erik Ostrom
|
145
|
+
* Ole Riesenberg
|
146
|
+
* Josh Kalderimis
|
147
|
+
* J.D. Hollis
|
148
|
+
* Jeffrey Chupp
|
149
|
+
* Rob Anderton
|
150
|
+
* Zach Inglis
|
151
|
+
* Ward Bekker
|
152
|
+
* Brian Terlson
|
153
|
+
* Christian Aust
|
154
|
+
* Martin Sarasale
|
155
|
+
* Édouard Brière
|
156
|
+
* Steve Madsen
|
157
|
+
* Justin DeWind
|
158
|
+
* Chris Z
|
159
|
+
* Chris Roos
|
160
|
+
* Andrew Assarattanakul
|
161
|
+
* Jonas von Andrian
|
162
|
+
* Dimitri Krassovski
|
163
|
+
* Sergey Kojin
|
164
|
+
* Brad Sumersford
|
165
|
+
* Amir Yalon
|
166
|
+
* Edgars Beigarts
|
167
|
+
* Ivan Ukhov
|
168
|
+
* Tomáš Pospíšek
|
169
|
+
* Jeffrey Hardy
|
170
|
+
* David Heinemeier Hansson
|
171
|
+
* Jimmy Hsu
|
172
|
+
* Bruno Michel
|
173
|
+
* Joren De Groof
|
174
|
+
* Jan De Poorter
|
175
|
+
* Tom Stuart
|
176
|
+
* James Brooks
|
177
|
+
* Andrew Coldham
|
178
|
+
* Mark Dodwell
|
179
|
+
* Frédéric Malamitsas
|
180
|
+
* Jon Gubman
|
181
|
+
* Michael Schuerig
|
182
|
+
* Ben Hutton
|
183
|
+
* Alfonso Jiménez
|
184
|
+
* Szymon Nowak
|
185
|
+
* Matthew Higgins
|
186
|
+
* Anton Sozontov
|
187
|
+
* Keith Pitt
|
188
|
+
* Lee Capps
|
189
|
+
* Sam Goldstein
|
190
|
+
* Artem Orlov
|
191
|
+
* Matt Todd
|
192
|
+
* Ivan Ukhov
|
193
|
+
* Stephen Celis
|
194
|
+
* Paco Guzmán
|
195
|
+
* Marcin Stecki
|
196
|
+
* Robert Glaser
|
197
|
+
* Brenton Fletcher
|
198
|
+
* Paul Schyska
|
199
|
+
* Kirill Maximov
|
200
|
+
* Hans Hasselberg
|
201
|
+
* Robert Stern
|
202
|
+
* George Anderson
|
203
|
+
* Greg Weber
|
204
|
+
* Javier Ramírez
|
205
|
+
* Patrick Tulskie
|
206
|
+
* Konstantin Shabanov
|
207
|
+
* Clemens Kofler
|
208
|
+
* Ryan Mohr
|
209
|
+
* Alex Chee
|
210
|
+
* Florent Piteau
|
211
|
+
* Bruno Santschi
|
212
|
+
* Lars Weiler
|
213
|
+
* Andrey Deryabin
|
214
|
+
* Andrew White
|
215
|
+
* Rémi Prévost
|
216
|
+
* Justin Tanner
|
217
|
+
* Josh Goebel
|
218
|
+
* Jonathan Viney
|
219
|
+
* Ngan Pham
|
220
|
+
* Martin Gordon
|
221
|
+
* Aaron Gibralter
|
222
|
+
* Pavel Forkert
|
223
|
+
* Anthony Byram
|
224
|
+
* Pete Deffendol
|
225
|
+
* Eduardo Casanova
|
226
|
+
* Tony Pitale
|
227
|
+
* Kenn Ejima
|
228
|
+
* Matthew Barnett
|
229
|
+
* Adrian Macneil
|
230
|
+
* Ilia Lobsanov
|
231
|
+
* Andrew Hunter
|
232
|
+
* Simon Hürlimann
|
233
|
+
* Nathan Smith
|
234
|
+
* Cedric Maion
|
235
|
+
* Steve Purcell
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: Abstract inheritance
|
2
|
+
In order to use Thinking Sphinx in complex situations
|
3
|
+
As a developer
|
4
|
+
I want to define indexes on subclasses of abstract models
|
5
|
+
|
6
|
+
Scenario: Searching on subclasses of abstract models
|
7
|
+
Given Sphinx is running
|
8
|
+
And I am searching on music
|
9
|
+
When I search
|
10
|
+
Then I should get 3 results
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Feature: Searching on a single model
|
2
|
+
In order to use search models with non-integer primary keys
|
3
|
+
A developer
|
4
|
+
Should be able to search on a single model
|
5
|
+
|
6
|
+
Scenario: Searching using a basic query
|
7
|
+
Given Sphinx is running
|
8
|
+
And I am searching on robots
|
9
|
+
When I search for Sizzle
|
10
|
+
Then I should get 2 results
|
11
|
+
|
12
|
+
Scenario: Searching using another basic query
|
13
|
+
Given Sphinx is running
|
14
|
+
And I am searching on robots
|
15
|
+
When I search for fritz
|
16
|
+
Then I should get 1 result
|
17
|
+
|
18
|
+
Scenario: Deleting an instance
|
19
|
+
Given Sphinx is running
|
20
|
+
And I am searching on robots
|
21
|
+
When I search for Expendable
|
22
|
+
Then I should get 1 result
|
23
|
+
|
24
|
+
When I destroy robot Expendable
|
25
|
+
And I wait for Sphinx to catch up
|
26
|
+
And I search for Expendable
|
27
|
+
Then I should get 0 results
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Feature: Handle not-quite-supported column types as attributes
|
2
|
+
In order for Thinking Sphinx to be more understanding with model structures
|
3
|
+
The plugin
|
4
|
+
Should be able to use translatable columns as attributes
|
5
|
+
|
6
|
+
Scenario: Decimals as floats
|
7
|
+
Given Sphinx is running
|
8
|
+
And I am searching on alphas
|
9
|
+
When I filter between 1.0 and 3.0 on cost
|
10
|
+
Then I should get 2 results
|
11
|
+
|
12
|
+
Scenario: Dates as Datetimes
|
13
|
+
Given Sphinx is running
|
14
|
+
And I am searching on alphas
|
15
|
+
When I filter between 2 and 4 days ago on created_on by date
|
16
|
+
Then I should get 3 results
|
17
|
+
|
18
|
+
Scenario: Timestamps as Datetimes
|
19
|
+
Given Sphinx is running
|
20
|
+
And I am searching on alphas
|
21
|
+
When I filter between 2 and 4 days ago on created_at
|
22
|
+
Then I should get 2 results
|
@@ -0,0 +1,77 @@
|
|
1
|
+
Feature: Update attributes directly to Sphinx
|
2
|
+
In order for updates to be more seamless
|
3
|
+
The plugin
|
4
|
+
Should update Sphinx's attributes where possible
|
5
|
+
|
6
|
+
Scenario: Updating attributes in Sphinx without delta indexes
|
7
|
+
Given Sphinx is running
|
8
|
+
And I am searching on alphas
|
9
|
+
When I filter by 3 on value
|
10
|
+
Then I should get 1 result
|
11
|
+
|
12
|
+
When I change the value of alpha four to 13
|
13
|
+
And I wait for Sphinx to catch up
|
14
|
+
And I filter by 13 on value
|
15
|
+
And I use index alpha_core
|
16
|
+
Then I should get 1 result
|
17
|
+
When I use index alternative_core
|
18
|
+
Then I should get 1 result
|
19
|
+
|
20
|
+
When I change the value of alpha four to 4
|
21
|
+
And I wait for Sphinx to catch up
|
22
|
+
And I filter by 13 on value
|
23
|
+
And I use index alpha_core
|
24
|
+
Then I should get 0 results
|
25
|
+
When I use index alternative_core
|
26
|
+
Then I should get 0 result
|
27
|
+
|
28
|
+
Scenario: Updating attributes in Sphinx with delta indexes
|
29
|
+
Given Sphinx is running
|
30
|
+
And I am searching on betas
|
31
|
+
When I filter by 8 on value
|
32
|
+
Then I should get 1 result
|
33
|
+
|
34
|
+
When I change the value of beta eight to 18
|
35
|
+
And I wait for Sphinx to catch up
|
36
|
+
And I filter by 18 on value
|
37
|
+
Then I should get 1 result
|
38
|
+
|
39
|
+
When I search for the document id of beta eight in the secondary_beta_delta index
|
40
|
+
Then it should not exist
|
41
|
+
|
42
|
+
Scenario: Updating attributes in a delta index
|
43
|
+
Given Sphinx is running
|
44
|
+
And I am searching on betas
|
45
|
+
|
46
|
+
When I change the name of beta nine to nineteen
|
47
|
+
And I change the value of beta nineteen to 19
|
48
|
+
And I wait for Sphinx to catch up
|
49
|
+
|
50
|
+
When I filter by 19 on value
|
51
|
+
And I use index secondary_beta_delta
|
52
|
+
Then I should get 1 result
|
53
|
+
|
54
|
+
Scenario: Updating attributes in a delta index with deltas disabled
|
55
|
+
Given Sphinx is running
|
56
|
+
And I am searching on betas
|
57
|
+
|
58
|
+
When I change the name of beta eleven to twentyone
|
59
|
+
And I disable delta updates
|
60
|
+
And I change the value of beta twentyone to 21
|
61
|
+
And I wait for Sphinx to catch up
|
62
|
+
|
63
|
+
When I filter by 21 on value
|
64
|
+
And I use index secondary_beta_delta
|
65
|
+
Then I should get 1 result
|
66
|
+
And I enable delta updates
|
67
|
+
|
68
|
+
Scenario: Updating boolean attribute in Sphinx
|
69
|
+
Given Sphinx is running
|
70
|
+
And I am searching on alphas
|
71
|
+
When I filter by active alphas
|
72
|
+
Then I should get 10 results
|
73
|
+
|
74
|
+
When I flag alpha five as inactive
|
75
|
+
And I wait for Sphinx to catch up
|
76
|
+
And I filter by active alphas
|
77
|
+
Then I should get 9 results
|