zipme-thinking-sphinx 1.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. data/LICENCE +20 -0
  2. data/README.textile +168 -0
  3. data/VERSION +1 -0
  4. data/features/abstract_inheritance.feature +10 -0
  5. data/features/alternate_primary_key.feature +27 -0
  6. data/features/attribute_transformation.feature +22 -0
  7. data/features/attribute_updates.feature +51 -0
  8. data/features/deleting_instances.feature +67 -0
  9. data/features/direct_attributes.feature +11 -0
  10. data/features/excerpts.feature +13 -0
  11. data/features/extensible_delta_indexing.feature +9 -0
  12. data/features/facets.feature +82 -0
  13. data/features/facets_across_model.feature +29 -0
  14. data/features/handling_edits.feature +92 -0
  15. data/features/retry_stale_indexes.feature +24 -0
  16. data/features/searching_across_models.feature +20 -0
  17. data/features/searching_by_index.feature +40 -0
  18. data/features/searching_by_model.feature +175 -0
  19. data/features/searching_with_find_arguments.feature +56 -0
  20. data/features/sphinx_detection.feature +25 -0
  21. data/features/sphinx_scopes.feature +42 -0
  22. data/features/step_definitions/alpha_steps.rb +16 -0
  23. data/features/step_definitions/beta_steps.rb +7 -0
  24. data/features/step_definitions/common_steps.rb +188 -0
  25. data/features/step_definitions/extensible_delta_indexing_steps.rb +7 -0
  26. data/features/step_definitions/facet_steps.rb +96 -0
  27. data/features/step_definitions/find_arguments_steps.rb +36 -0
  28. data/features/step_definitions/gamma_steps.rb +15 -0
  29. data/features/step_definitions/scope_steps.rb +15 -0
  30. data/features/step_definitions/search_steps.rb +89 -0
  31. data/features/step_definitions/sphinx_steps.rb +35 -0
  32. data/features/sti_searching.feature +19 -0
  33. data/features/support/database.example.yml +3 -0
  34. data/features/support/db/fixtures/alphas.rb +10 -0
  35. data/features/support/db/fixtures/authors.rb +1 -0
  36. data/features/support/db/fixtures/betas.rb +10 -0
  37. data/features/support/db/fixtures/boxes.rb +9 -0
  38. data/features/support/db/fixtures/categories.rb +1 -0
  39. data/features/support/db/fixtures/cats.rb +3 -0
  40. data/features/support/db/fixtures/comments.rb +24 -0
  41. data/features/support/db/fixtures/developers.rb +29 -0
  42. data/features/support/db/fixtures/dogs.rb +3 -0
  43. data/features/support/db/fixtures/extensible_betas.rb +10 -0
  44. data/features/support/db/fixtures/foxes.rb +3 -0
  45. data/features/support/db/fixtures/gammas.rb +10 -0
  46. data/features/support/db/fixtures/music.rb +4 -0
  47. data/features/support/db/fixtures/people.rb +1001 -0
  48. data/features/support/db/fixtures/posts.rb +6 -0
  49. data/features/support/db/fixtures/robots.rb +14 -0
  50. data/features/support/db/fixtures/tags.rb +27 -0
  51. data/features/support/db/migrations/create_alphas.rb +8 -0
  52. data/features/support/db/migrations/create_animals.rb +5 -0
  53. data/features/support/db/migrations/create_authors.rb +3 -0
  54. data/features/support/db/migrations/create_authors_posts.rb +6 -0
  55. data/features/support/db/migrations/create_betas.rb +5 -0
  56. data/features/support/db/migrations/create_boxes.rb +5 -0
  57. data/features/support/db/migrations/create_categories.rb +3 -0
  58. data/features/support/db/migrations/create_comments.rb +10 -0
  59. data/features/support/db/migrations/create_developers.rb +9 -0
  60. data/features/support/db/migrations/create_extensible_betas.rb +5 -0
  61. data/features/support/db/migrations/create_gammas.rb +3 -0
  62. data/features/support/db/migrations/create_genres.rb +3 -0
  63. data/features/support/db/migrations/create_music.rb +6 -0
  64. data/features/support/db/migrations/create_people.rb +13 -0
  65. data/features/support/db/migrations/create_posts.rb +5 -0
  66. data/features/support/db/migrations/create_robots.rb +4 -0
  67. data/features/support/db/migrations/create_taggings.rb +5 -0
  68. data/features/support/db/migrations/create_tags.rb +4 -0
  69. data/features/support/env.rb +21 -0
  70. data/features/support/lib/generic_delta_handler.rb +8 -0
  71. data/features/support/models/alpha.rb +22 -0
  72. data/features/support/models/animal.rb +5 -0
  73. data/features/support/models/author.rb +3 -0
  74. data/features/support/models/beta.rb +8 -0
  75. data/features/support/models/box.rb +8 -0
  76. data/features/support/models/cat.rb +3 -0
  77. data/features/support/models/category.rb +4 -0
  78. data/features/support/models/comment.rb +10 -0
  79. data/features/support/models/developer.rb +16 -0
  80. data/features/support/models/dog.rb +3 -0
  81. data/features/support/models/extensible_beta.rb +9 -0
  82. data/features/support/models/fox.rb +5 -0
  83. data/features/support/models/gamma.rb +5 -0
  84. data/features/support/models/genre.rb +3 -0
  85. data/features/support/models/medium.rb +5 -0
  86. data/features/support/models/music.rb +8 -0
  87. data/features/support/models/person.rb +23 -0
  88. data/features/support/models/post.rb +21 -0
  89. data/features/support/models/robot.rb +12 -0
  90. data/features/support/models/tag.rb +3 -0
  91. data/features/support/models/tagging.rb +4 -0
  92. data/lib/cucumber/thinking_sphinx/external_world.rb +8 -0
  93. data/lib/cucumber/thinking_sphinx/internal_world.rb +126 -0
  94. data/lib/cucumber/thinking_sphinx/sql_logger.rb +20 -0
  95. data/lib/thinking_sphinx.rb +231 -0
  96. data/lib/thinking_sphinx/active_record.rb +373 -0
  97. data/lib/thinking_sphinx/active_record/attribute_updates.rb +46 -0
  98. data/lib/thinking_sphinx/active_record/delta.rb +61 -0
  99. data/lib/thinking_sphinx/active_record/has_many_association.rb +29 -0
  100. data/lib/thinking_sphinx/active_record/scopes.rb +75 -0
  101. data/lib/thinking_sphinx/adapters/abstract_adapter.rb +42 -0
  102. data/lib/thinking_sphinx/adapters/mysql_adapter.rb +54 -0
  103. data/lib/thinking_sphinx/adapters/postgresql_adapter.rb +143 -0
  104. data/lib/thinking_sphinx/association.rb +164 -0
  105. data/lib/thinking_sphinx/attribute.rb +362 -0
  106. data/lib/thinking_sphinx/auto_version.rb +22 -0
  107. data/lib/thinking_sphinx/class_facet.rb +15 -0
  108. data/lib/thinking_sphinx/configuration.rb +283 -0
  109. data/lib/thinking_sphinx/context.rb +68 -0
  110. data/lib/thinking_sphinx/core/array.rb +7 -0
  111. data/lib/thinking_sphinx/core/string.rb +15 -0
  112. data/lib/thinking_sphinx/deltas.rb +28 -0
  113. data/lib/thinking_sphinx/deltas/default_delta.rb +62 -0
  114. data/lib/thinking_sphinx/deploy/capistrano.rb +100 -0
  115. data/lib/thinking_sphinx/excerpter.rb +22 -0
  116. data/lib/thinking_sphinx/facet.rb +125 -0
  117. data/lib/thinking_sphinx/facet_search.rb +136 -0
  118. data/lib/thinking_sphinx/field.rb +82 -0
  119. data/lib/thinking_sphinx/index.rb +157 -0
  120. data/lib/thinking_sphinx/index/builder.rb +296 -0
  121. data/lib/thinking_sphinx/index/faux_column.rb +110 -0
  122. data/lib/thinking_sphinx/property.rb +162 -0
  123. data/lib/thinking_sphinx/rails_additions.rb +150 -0
  124. data/lib/thinking_sphinx/search.rb +775 -0
  125. data/lib/thinking_sphinx/search_methods.rb +439 -0
  126. data/lib/thinking_sphinx/source.rb +153 -0
  127. data/lib/thinking_sphinx/source/internal_properties.rb +46 -0
  128. data/lib/thinking_sphinx/source/sql.rb +130 -0
  129. data/lib/thinking_sphinx/tasks.rb +121 -0
  130. data/lib/thinking_sphinx/test.rb +52 -0
  131. data/rails/init.rb +16 -0
  132. data/spec/thinking_sphinx/active_record/delta_spec.rb +128 -0
  133. data/spec/thinking_sphinx/active_record/has_many_association_spec.rb +55 -0
  134. data/spec/thinking_sphinx/active_record/scopes_spec.rb +177 -0
  135. data/spec/thinking_sphinx/active_record_spec.rb +622 -0
  136. data/spec/thinking_sphinx/association_spec.rb +239 -0
  137. data/spec/thinking_sphinx/attribute_spec.rb +570 -0
  138. data/spec/thinking_sphinx/auto_version_spec.rb +39 -0
  139. data/spec/thinking_sphinx/configuration_spec.rb +234 -0
  140. data/spec/thinking_sphinx/context_spec.rb +119 -0
  141. data/spec/thinking_sphinx/core/array_spec.rb +9 -0
  142. data/spec/thinking_sphinx/core/string_spec.rb +9 -0
  143. data/spec/thinking_sphinx/excerpter_spec.rb +57 -0
  144. data/spec/thinking_sphinx/facet_search_spec.rb +176 -0
  145. data/spec/thinking_sphinx/facet_spec.rb +333 -0
  146. data/spec/thinking_sphinx/field_spec.rb +154 -0
  147. data/spec/thinking_sphinx/index/builder_spec.rb +479 -0
  148. data/spec/thinking_sphinx/index/faux_column_spec.rb +30 -0
  149. data/spec/thinking_sphinx/index_spec.rb +183 -0
  150. data/spec/thinking_sphinx/rails_additions_spec.rb +203 -0
  151. data/spec/thinking_sphinx/search_methods_spec.rb +152 -0
  152. data/spec/thinking_sphinx/search_spec.rb +1181 -0
  153. data/spec/thinking_sphinx/source_spec.rb +235 -0
  154. data/spec/thinking_sphinx_spec.rb +204 -0
  155. data/tasks/distribution.rb +39 -0
  156. data/tasks/rails.rake +1 -0
  157. data/tasks/testing.rb +72 -0
  158. metadata +242 -0
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,168 @@
1
+ h1. Thinking Sphinx
2
+
3
+ h2. Usage
4
+
5
+ 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.
6
+
7
+ add the following options to your sphinx.yml file to support chinese character index
8
+ <pre>
9
+ chinese_dictionary: /path/to/your/dict
10
+ </pre>
11
+
12
+ You need to patch your sphinx before generating the index. Check http://code.google.com/p/sphinx-for-chinese/ for more details.
13
+
14
+ Keep in mind that while Thinking Sphinx works for ActiveRecord with Merb, it doesn't yet support DataMapper (although that is planned).
15
+
16
+ h2. Contributing
17
+
18
+ Fork on GitHub and after you've committed tested patches, send a pull request.
19
+
20
+ 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.
21
+
22
+ To get the spec suite running, you will need to install the ginger gem:
23
+
24
+ <pre><code>sudo gem install ginger --source http://gemcutter.org</code></pre>
25
+
26
+ 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.
27
+
28
+ <pre>
29
+ sudo gem install bluecloth cucumber yard jeweler rspec
30
+ </pre>
31
+
32
+ Then set up your database:
33
+
34
+ <pre>
35
+ cp spec/fixtures/database.yml.default spec/fixtures/database.yml &&
36
+ mysqladmin -u root create thinking_sphinx
37
+ </pre>
38
+
39
+ This last step can be done automatically by the contribute.rb script if all dependencies are met.
40
+
41
+ Make sure you don't have another Sphinx daemon (searchd) running. If you do, quit it with "rake ts:stop"
42
+ in the app root.
43
+
44
+ You should now have a passing test suite from which to build your patch on.
45
+
46
+ <pre>
47
+ rake spec
48
+ </pre>
49
+
50
+ If you get the message "Failed to start searchd daemon", run the spec with sudo:
51
+
52
+ <pre>
53
+ sudo rake spec
54
+ </pre>
55
+
56
+ If you quit the spec suite before it's completed, you may be left with data in the test
57
+ database, causing the next run to have failures. Let that run complete and then try again.
58
+
59
+ h2. Contributors
60
+
61
+ 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:
62
+
63
+ * Joost Hietbrink
64
+ * Jonathan Conway
65
+ * Gregory Mirzayantz
66
+ * Tung Nguyen
67
+ * Sean Cribbs
68
+ * Benoit Caccinolo
69
+ * John Barton
70
+ * Oliver Beddows
71
+ * Arthur Zapparoli
72
+ * Dusty Doris
73
+ * Marcus Crafter
74
+ * Patrick Lenz
75
+ * Björn Andreasson
76
+ * James Healy
77
+ * Jae-Jun Hwang
78
+ * Xavier Shay
79
+ * Jason Rust
80
+ * Gopal Patel
81
+ * Chris Heald
82
+ * Peter Vandenberk
83
+ * Josh French
84
+ * Andrew Bennett
85
+ * Jordan Fowler
86
+ * Seth Walker
87
+ * Joe Noon
88
+ * Wolfgang Postler
89
+ * Rick Olson
90
+ * Killian Murphy
91
+ * Morten Primdahl
92
+ * Ryan Bates
93
+ * David Eisinger
94
+ * Shay Arnett
95
+ * Minh Tran
96
+ * Jeremy Durham
97
+ * Piotr Sarnacki
98
+ * Matt Johnson
99
+ * Nicolas Blanco
100
+ * Max Lapshin
101
+ * Josh Natanson
102
+ * Philip Hallstrom
103
+ * Christian Rishøj
104
+ * Mike Flester
105
+ * Jim Remsik
106
+ * Kennon Ballou
107
+ * Henrik Nyh
108
+ * Emil Tin
109
+ * Doug Cole
110
+ * Ed Hickey
111
+ * Evan Weaver
112
+ * Thibaut Barrere
113
+ * Kristopher Chambers
114
+ * Dmitrij Smalko
115
+ * Aleksey Yeschenko
116
+ * Lachie Cox
117
+ * Lourens Naude
118
+ * Tom Davies
119
+ * Dan Pickett
120
+ * Alex Caudill
121
+ * Jim Benton
122
+ * John Aughey
123
+ * Keith Pitty
124
+ * Jeff Talbot
125
+ * Dana Contreras
126
+ * Menno van der Sman
127
+ * Bill Harding
128
+ * Isaac Feliu
129
+ * Andrei Bocan
130
+ * László Bácsi
131
+ * Peter Wagenet
132
+ * Max Lapshin
133
+ * Martin Emde
134
+ * David Wennergren
135
+ * Mark Lane
136
+ * Eric Lindvall
137
+ * Lawrence Pit
138
+ * Mike Bailey
139
+ * Bill Leeper
140
+ * Michael Reinsch
141
+ * Anderson Dias
142
+ * Jerome Riga
143
+ * Tien Dung
144
+ * Johannes Kaefer
145
+ * Paul Campbell
146
+ * Matthew Beale
147
+ * Tom Simnett
148
+ * Erik Ostrom
149
+ * Ole Riesenberg
150
+ * Josh Kalderimis
151
+ * J.D. Hollis
152
+ * Jeffrey Chupp
153
+ * Rob Anderton
154
+ * Zach Inglis
155
+ * Ward Bekker
156
+ * Brian Terlson
157
+ * Christian Aust
158
+ * Martin Sarasale
159
+ * Édouard Brière
160
+ * Steve Madsen
161
+ * Justin DeWind
162
+ * Chris Z
163
+ * Chris Roos
164
+ * Andrew Assarattanakul
165
+ * Jonas von Andrian
166
+ * Dimitri Krassovski
167
+ * Sergey Kojin
168
+ * Brad Sumersford
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.3.14
@@ -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 1 and 3 days ago on created_on
16
+ Then I should get 2 results
17
+
18
+ Scenario: Timestamps as Datetimes
19
+ Given Sphinx is running
20
+ And I am searching on alphas
21
+ When I filter between 1 and 3 days ago on created_at
22
+ Then I should get 2 results
@@ -0,0 +1,51 @@
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 beta_delta index
40
+ Then it should not exist
41
+
42
+ Scenario: Updating boolean attribute in Sphinx
43
+ Given Sphinx is running
44
+ And I am searching on alphas
45
+ When I filter by active alphas
46
+ Then I should get 10 results
47
+
48
+ When I flag alpha five as inactive
49
+ And I wait for Sphinx to catch up
50
+ And I filter by active alphas
51
+ Then I should get 9 results
@@ -0,0 +1,67 @@
1
+ Feature: Keeping Sphinx in line with deleted model instances
2
+ In order to avoid deleted items being returned by Sphinx
3
+ Thinking Sphinx
4
+ Should keep deleted items out of search results
5
+
6
+ Scenario: Deleting instances from the core index
7
+ Given Sphinx is running
8
+ And I am searching on betas
9
+ When I search for three
10
+ Then I should get 1 result
11
+
12
+ When I destroy beta three
13
+ And I wait for Sphinx to catch up
14
+ And I search for three
15
+ Then I should get 0 results
16
+
17
+ Scenario: Deleting subclasses when the parent class is indexed
18
+ Given Sphinx is running
19
+ And I am searching on cats
20
+ When I search for moggy
21
+ Then I should get 1 result
22
+
23
+ When I destroy cat moggy
24
+ And I wait for Sphinx to catch up
25
+ And I search for moggy
26
+ Then I should get 0 results
27
+
28
+ Scenario: Deleting created instances from the delta index
29
+ Given Sphinx is running
30
+ And I am searching on betas
31
+ When I create a new beta named eleven
32
+ And I wait for Sphinx to catch up
33
+ And I search for eleven
34
+ Then I should get 1 result
35
+
36
+ When I destroy beta eleven
37
+ And I wait for Sphinx to catch up
38
+ And I search for eleven
39
+ Then I should get 0 results
40
+
41
+ Scenario: Deleting edited instances from the delta index
42
+ Given Sphinx is running
43
+ And I am searching on betas
44
+ When I change the name of beta four to fourteen
45
+ And I wait for Sphinx to catch up
46
+ And I search for fourteen
47
+ Then I should get 1 result
48
+
49
+ When I destroy beta fourteen
50
+ And I wait for Sphinx to catch up
51
+ And I search for fourteen
52
+ Then I should get 0 results
53
+
54
+ Scenario: Deleting created instances from the delta index when deltas are disabled
55
+ Given Sphinx is running
56
+ And I am searching on betas
57
+ When I create a new beta named thirteen
58
+ And I wait for Sphinx to catch up
59
+ And I search for thirteen
60
+ Then I should get 1 result
61
+
62
+ And I disable delta updates
63
+ And I destroy beta thirteen
64
+ And I wait for Sphinx to catch up
65
+ And I enable delta updates
66
+ And I search for thirteen
67
+ Then I should get 0 results
@@ -0,0 +1,11 @@
1
+ Feature: Direct Attributes
2
+ In order to avoid unnecessary SQL queries
3
+ I want to access attribute values from Sphinx's response
4
+
5
+ Scenario: Accessing attribute values directly
6
+ Given Sphinx is running
7
+ And I am searching on posts
8
+ When I search
9
+ Then the first result should have a comments count of 9
10
+
11
+
@@ -0,0 +1,13 @@
1
+ Feature: Generate excerpts for search results
2
+
3
+ Scenario: Basic Excerpts Syntax
4
+ Given Sphinx is running
5
+ And I am searching on comments
6
+ And I search for "lorem punto"
7
+ Then the content excerpt of the first result is "de un sitio mientras que mira su diseño. El <span class="match">punto</span> de usar <span class="match">Lorem</span> Ipsum es que tiene una distribución"
8
+
9
+ Scenario: Integrated Excerpts Syntax
10
+ Given Sphinx is running
11
+ And I am searching on comments
12
+ And I search for "lorem"
13
+ Then calling content on the first result excerpts object should return "de un sitio mientras que mira su diseño. El punto de usar <span class="match">Lorem</span> Ipsum es que tiene una distribución"
@@ -0,0 +1,9 @@
1
+ Feature: Delayed Delta Indexing
2
+ In order to have delta indexing on frequently-updated sites
3
+ Developers
4
+ Should be able to create their own handlers for delta indexing
5
+
6
+ Scenario: I specify a valid handler for delta indexing
7
+ Given Sphinx is running
8
+ When I change the name of extensible beta one to eleven
9
+ Then the generic delta handler should handle the delta indexing
@@ -0,0 +1,82 @@
1
+ Feature: Search and browse models by their defined facets
2
+
3
+ Scenario: Requesting facets
4
+ Given Sphinx is running
5
+ And I am searching on developers
6
+ When I am requesting facet results
7
+ Then I should have valid facet results
8
+ And I should have 6 facets
9
+ And I should have the facet State
10
+ And I should have the facet Country
11
+ And I should have the facet Age
12
+ And I should have the facet City
13
+ And I should have the facet Tag Ids
14
+ And I should have the facet Tags
15
+
16
+ Scenario: Requesting specific facets
17
+ Given Sphinx is running
18
+ And I am searching on developers
19
+ When I am requesting facet results
20
+ And I am requesting just the facet State
21
+ Then I should have valid facet results
22
+ And I should have 1 facet
23
+ And I should have the facet State
24
+ When I am requesting just the facets State and Age
25
+ Then I should have valid facet results
26
+ And I should have 2 facet
27
+ And I should have the facet State
28
+ And I should have the facet Age
29
+
30
+ Scenario: Requseting float facets
31
+ Given Sphinx is running
32
+ And I am searching on alphas
33
+ When I am requesting facet results
34
+ Then I should have 1 facet
35
+ And the Cost facet should have a 5.55 key
36
+
37
+ Scenario: Requesting facet results
38
+ Given Sphinx is running
39
+ And I am searching on developers
40
+ When I am requesting facet results
41
+ And I drill down where Country is Australia
42
+ Then I should get 11 results
43
+
44
+ Scenario: Requesting facet results by multiple facets
45
+ Given Sphinx is running
46
+ And I am searching on developers
47
+ When I am requesting facet results
48
+ And I drill down where Country is Australia and Age is 30
49
+ Then I should get 4 results
50
+
51
+ Scenario: Requesting facets with classes included
52
+ Given Sphinx is running
53
+ And I am searching on developers
54
+ When I am requesting facet results
55
+ And I want classes included
56
+ Then I should have valid facet results
57
+ And I should have 7 facets
58
+ And I should have the facet Class
59
+
60
+ Scenario: Requesting MVA facets
61
+ Given Sphinx is running
62
+ And I am searching on developers
63
+ When I am requesting facet results
64
+ And I drill down where tag_ids includes the id of tag Australia
65
+ Then I should get 11 results
66
+ When I am requesting facet results
67
+ And I drill down where tag_ids includes the id of tags Melbourne or Sydney
68
+ Then I should get 5 results
69
+
70
+ Scenario: Requesting MVA string facets
71
+ Given Sphinx is running
72
+ And I am searching on developers
73
+ When I am requesting facet results
74
+ Then the Tags facet should have an "Australia" key
75
+ Then the Tags facet should have an "Melbourne" key
76
+ Then the Tags facet should have an "Victoria" key
77
+
78
+ Scenario: Requesting MVA facets from source queries
79
+ Given Sphinx is running
80
+ And I am searching on posts
81
+ When I am requesting facet results
82
+ Then the Comment Ids facet should have 9 keys