sphinx 0.9.10.2122 → 2.1.1.3711

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/.gitignore +5 -2
  2. data/.travis.yml +8 -0
  3. data/CHANGELOG.md +71 -0
  4. data/Gemfile +4 -0
  5. data/README.md +221 -0
  6. data/Rakefile +40 -35
  7. data/lib/sphinx.rb +3 -8
  8. data/lib/sphinx/client.rb +223 -70
  9. data/lib/sphinx/constants.rb +23 -8
  10. data/lib/sphinx/response.rb +6 -6
  11. data/lib/sphinx/timeout.rb +1 -2
  12. data/lib/sphinx/version.rb +3 -0
  13. data/spec/client_response_spec.rb +77 -64
  14. data/spec/client_spec.rb +68 -31
  15. data/spec/client_validations_spec.rb +61 -7
  16. data/spec/fixtures/requests/default_search.dat +0 -0
  17. data/spec/fixtures/requests/default_search_index.dat +0 -0
  18. data/spec/fixtures/requests/excerpt_custom.dat +0 -0
  19. data/spec/fixtures/requests/excerpt_default.dat +0 -0
  20. data/spec/fixtures/requests/excerpt_flags.dat +0 -0
  21. data/spec/fixtures/requests/field_weights.dat +0 -0
  22. data/spec/fixtures/requests/filter.dat +0 -0
  23. data/spec/fixtures/requests/filter_exclude.dat +0 -0
  24. data/spec/fixtures/requests/filter_float_range.dat +0 -0
  25. data/spec/fixtures/requests/filter_float_range_exclude.dat +0 -0
  26. data/spec/fixtures/requests/filter_range.dat +0 -0
  27. data/spec/fixtures/requests/filter_range_exclude.dat +0 -0
  28. data/spec/fixtures/requests/filter_range_int64.dat +0 -0
  29. data/spec/fixtures/requests/filter_ranges.dat +0 -0
  30. data/spec/fixtures/requests/filters.dat +0 -0
  31. data/spec/fixtures/requests/filters_different.dat +0 -0
  32. data/spec/fixtures/requests/geo_anchor.dat +0 -0
  33. data/spec/fixtures/requests/group_by_attr.dat +0 -0
  34. data/spec/fixtures/requests/group_by_attrpair.dat +0 -0
  35. data/spec/fixtures/requests/group_by_day.dat +0 -0
  36. data/spec/fixtures/requests/group_by_day_sort.dat +0 -0
  37. data/spec/fixtures/requests/group_by_month.dat +0 -0
  38. data/spec/fixtures/requests/group_by_week.dat +0 -0
  39. data/spec/fixtures/requests/group_by_year.dat +0 -0
  40. data/spec/fixtures/requests/group_distinct.dat +0 -0
  41. data/spec/fixtures/requests/id_range.dat +0 -0
  42. data/spec/fixtures/requests/id_range64.dat +0 -0
  43. data/spec/fixtures/requests/index_weights.dat +0 -0
  44. data/spec/fixtures/requests/keywords.dat +0 -0
  45. data/spec/fixtures/requests/limits.dat +0 -0
  46. data/spec/fixtures/requests/limits_cutoff.dat +0 -0
  47. data/spec/fixtures/requests/limits_max.dat +0 -0
  48. data/spec/fixtures/requests/limits_max_cutoff.dat +0 -0
  49. data/spec/fixtures/requests/match_all.dat +0 -0
  50. data/spec/fixtures/requests/match_any.dat +0 -0
  51. data/spec/fixtures/requests/match_boolean.dat +0 -0
  52. data/spec/fixtures/requests/match_extended.dat +0 -0
  53. data/spec/fixtures/requests/match_extended2.dat +0 -0
  54. data/spec/fixtures/requests/match_fullscan.dat +0 -0
  55. data/spec/fixtures/requests/match_phrase.dat +0 -0
  56. data/spec/fixtures/requests/max_query_time.dat +0 -0
  57. data/spec/fixtures/requests/miltiple_queries.dat +0 -0
  58. data/spec/fixtures/requests/outer_select.dat +0 -0
  59. data/spec/fixtures/requests/override.dat +0 -0
  60. data/spec/fixtures/{default_search.php → requests/php/default_search.php} +1 -1
  61. data/spec/fixtures/{default_search_index.php → requests/php/default_search_index.php} +1 -1
  62. data/spec/fixtures/{excerpt_custom.php → requests/php/excerpt_custom.php} +1 -1
  63. data/spec/fixtures/{excerpt_default.php → requests/php/excerpt_default.php} +1 -1
  64. data/spec/fixtures/{excerpt_flags.php → requests/php/excerpt_flags.php} +1 -1
  65. data/spec/fixtures/{field_weights.php → requests/php/field_weights.php} +1 -1
  66. data/spec/fixtures/{filter.php → requests/php/filter.php} +1 -1
  67. data/spec/fixtures/{filter_exclude.php → requests/php/filter_exclude.php} +1 -1
  68. data/spec/fixtures/{filter_float_range.php → requests/php/filter_float_range.php} +1 -1
  69. data/spec/fixtures/{filter_float_range_exclude.php → requests/php/filter_float_range_exclude.php} +1 -1
  70. data/spec/fixtures/{filter_range.php → requests/php/filter_range.php} +1 -1
  71. data/spec/fixtures/{filter_range_exclude.php → requests/php/filter_range_exclude.php} +1 -1
  72. data/spec/fixtures/{filter_range_int64.php → requests/php/filter_range_int64.php} +1 -1
  73. data/spec/fixtures/{filter_ranges.php → requests/php/filter_ranges.php} +1 -1
  74. data/spec/fixtures/{filters.php → requests/php/filters.php} +1 -1
  75. data/spec/fixtures/{filters_different.php → requests/php/filters_different.php} +1 -1
  76. data/spec/fixtures/{geo_anchor.php → requests/php/geo_anchor.php} +1 -1
  77. data/spec/fixtures/{group_by_attr.php → requests/php/group_by_attr.php} +1 -1
  78. data/spec/fixtures/{group_by_attrpair.php → requests/php/group_by_attrpair.php} +1 -1
  79. data/spec/fixtures/{group_by_day.php → requests/php/group_by_day.php} +1 -1
  80. data/spec/fixtures/{group_by_day_sort.php → requests/php/group_by_day_sort.php} +1 -1
  81. data/spec/fixtures/{group_by_month.php → requests/php/group_by_month.php} +1 -1
  82. data/spec/fixtures/{group_by_week.php → requests/php/group_by_week.php} +1 -1
  83. data/spec/fixtures/{group_by_year.php → requests/php/group_by_year.php} +1 -1
  84. data/spec/fixtures/{group_distinct.php → requests/php/group_distinct.php} +1 -1
  85. data/spec/fixtures/{id_range.php → requests/php/id_range.php} +1 -1
  86. data/spec/fixtures/{id_range64.php → requests/php/id_range64.php} +1 -1
  87. data/spec/fixtures/{index_weights.php → requests/php/index_weights.php} +1 -1
  88. data/spec/fixtures/{keywords.php → requests/php/keywords.php} +1 -1
  89. data/spec/fixtures/{limits.php → requests/php/limits.php} +1 -1
  90. data/spec/fixtures/{limits_cutoff.php → requests/php/limits_cutoff.php} +1 -1
  91. data/spec/fixtures/{limits_max.php → requests/php/limits_max.php} +1 -1
  92. data/spec/fixtures/{limits_max_cutoff.php → requests/php/limits_max_cutoff.php} +1 -1
  93. data/spec/fixtures/{match_all.php → requests/php/match_all.php} +1 -1
  94. data/spec/fixtures/{match_any.php → requests/php/match_any.php} +1 -1
  95. data/spec/fixtures/{match_boolean.php → requests/php/match_boolean.php} +1 -1
  96. data/spec/fixtures/{match_extended.php → requests/php/match_extended.php} +1 -1
  97. data/spec/fixtures/{match_extended2.php → requests/php/match_extended2.php} +1 -1
  98. data/spec/fixtures/{match_fullscan.php → requests/php/match_fullscan.php} +1 -1
  99. data/spec/fixtures/{match_phrase.php → requests/php/match_phrase.php} +1 -1
  100. data/spec/fixtures/{max_query_time.php → requests/php/max_query_time.php} +1 -1
  101. data/spec/fixtures/{miltiple_queries.php → requests/php/miltiple_queries.php} +1 -1
  102. data/spec/fixtures/requests/php/outer_select.php +9 -0
  103. data/spec/fixtures/{set_override.php → requests/php/override.php} +1 -1
  104. data/spec/fixtures/requests/php/query_flag.php +13 -0
  105. data/spec/fixtures/requests/php/query_flag_after_reset.php +19 -0
  106. data/spec/fixtures/{ranking_bm25.php → requests/php/ranking_bm25.php} +1 -1
  107. data/spec/fixtures/requests/php/ranking_expr.php +9 -0
  108. data/spec/fixtures/{ranking_fieldmask.php → requests/php/ranking_fieldmask.php} +1 -1
  109. data/spec/fixtures/{ranking_matchany.php → requests/php/ranking_matchany.php} +1 -1
  110. data/spec/fixtures/{ranking_none.php → requests/php/ranking_none.php} +1 -1
  111. data/spec/fixtures/{ranking_proximity.php → requests/php/ranking_proximity.php} +1 -1
  112. data/spec/fixtures/{ranking_proximity_bm25.php → requests/php/ranking_proximity_bm25.php} +1 -1
  113. data/spec/fixtures/{ranking_sph04.php → requests/php/ranking_sph04.php} +1 -1
  114. data/spec/fixtures/{ranking_wordcount.php → requests/php/ranking_wordcount.php} +1 -1
  115. data/spec/fixtures/{retries.php → requests/php/retries.php} +1 -1
  116. data/spec/fixtures/{retries_delay.php → requests/php/retries_delay.php} +1 -1
  117. data/spec/fixtures/{select.php → requests/php/select.php} +1 -1
  118. data/spec/fixtures/{sort_attr_asc.php → requests/php/sort_attr_asc.php} +1 -1
  119. data/spec/fixtures/{sort_attr_desc.php → requests/php/sort_attr_desc.php} +1 -1
  120. data/spec/fixtures/{sort_expr.php → requests/php/sort_expr.php} +1 -1
  121. data/spec/fixtures/{sort_extended.php → requests/php/sort_extended.php} +1 -1
  122. data/spec/fixtures/{sort_relevance.php → requests/php/sort_relevance.php} +1 -1
  123. data/spec/fixtures/{sort_time_segments.php → requests/php/sort_time_segments.php} +1 -1
  124. data/spec/fixtures/{update_attributes.php → requests/php/update_attributes.php} +1 -1
  125. data/spec/fixtures/{update_attributes_mva.php → requests/php/update_attributes_mva.php} +1 -1
  126. data/spec/fixtures/{weights.php → requests/php/weights.php} +1 -1
  127. data/spec/fixtures/requests/query_flag.dat +0 -0
  128. data/spec/fixtures/requests/query_flag_after_reset.dat +0 -0
  129. data/spec/fixtures/requests/ranking_bm25.dat +0 -0
  130. data/spec/fixtures/requests/ranking_expr.dat +0 -0
  131. data/spec/fixtures/requests/ranking_fieldmask.dat +0 -0
  132. data/spec/fixtures/requests/ranking_matchany.dat +0 -0
  133. data/spec/fixtures/requests/ranking_none.dat +0 -0
  134. data/spec/fixtures/requests/ranking_proximity.dat +0 -0
  135. data/spec/fixtures/requests/ranking_proximity_bm25.dat +0 -0
  136. data/spec/fixtures/requests/ranking_sph04.dat +0 -0
  137. data/spec/fixtures/requests/ranking_wordcount.dat +0 -0
  138. data/spec/fixtures/requests/retries.dat +0 -0
  139. data/spec/fixtures/requests/retries_delay.dat +0 -0
  140. data/spec/fixtures/requests/select.dat +0 -0
  141. data/spec/fixtures/requests/sort_attr_asc.dat +0 -0
  142. data/spec/fixtures/requests/sort_attr_desc.dat +0 -0
  143. data/spec/fixtures/requests/sort_expr.dat +0 -0
  144. data/spec/fixtures/requests/sort_extended.dat +0 -0
  145. data/spec/fixtures/requests/sort_relevance.dat +0 -0
  146. data/spec/fixtures/requests/sort_time_segments.dat +0 -0
  147. data/spec/fixtures/requests/update_attributes.dat +0 -0
  148. data/spec/fixtures/requests/update_attributes_mva.dat +0 -0
  149. data/spec/fixtures/requests/weights.dat +0 -0
  150. data/spec/fixtures/responses/build_excerpts.dat +0 -0
  151. data/spec/fixtures/responses/build_keywords.dat +0 -0
  152. data/spec/fixtures/responses/flush_attributes.dat +0 -0
  153. data/spec/fixtures/responses/flush_attrs.dat +2 -0
  154. data/spec/fixtures/responses/open.dat +0 -0
  155. data/spec/fixtures/responses/open_twice.dat +0 -0
  156. data/spec/fixtures/responses/php/build_excerpts.php +8 -0
  157. data/spec/fixtures/responses/php/build_keywords.php +8 -0
  158. data/spec/fixtures/responses/php/flush_attributes.php +8 -0
  159. data/spec/fixtures/responses/php/open.php +8 -0
  160. data/spec/fixtures/responses/php/open_twice.php +9 -0
  161. data/spec/fixtures/responses/php/query.php +8 -0
  162. data/spec/fixtures/responses/php/query_error.php +8 -0
  163. data/spec/fixtures/responses/php/query_id64.php +8 -0
  164. data/spec/fixtures/responses/php/run_queries.php +10 -0
  165. data/spec/fixtures/responses/php/run_queries_error.php +9 -0
  166. data/spec/fixtures/responses/php/status.php +8 -0
  167. data/spec/fixtures/responses/php/update_attributes.php +8 -0
  168. data/spec/fixtures/responses/php/update_attributes_mva.php +8 -0
  169. data/spec/fixtures/responses/query.dat +0 -0
  170. data/spec/fixtures/responses/query_error.dat +0 -0
  171. data/spec/fixtures/responses/query_id64.dat +0 -0
  172. data/spec/fixtures/responses/run_queries.dat +0 -0
  173. data/spec/fixtures/responses/run_queries_error.dat +0 -0
  174. data/spec/fixtures/responses/status.dat +0 -0
  175. data/spec/fixtures/responses/update_attributes.dat +0 -0
  176. data/spec/fixtures/responses/update_attributes_mva.dat +0 -0
  177. data/spec/fixtures/sphinxapi.php +217 -45
  178. data/spec/spec_helper.rb +18 -3
  179. data/spec/sphinx/sphinx-id64.conf +6 -6
  180. data/spec/sphinx/sphinx.conf +6 -6
  181. data/sphinx.gemspec +19 -121
  182. metadata +268 -105
  183. data/README.rdoc +0 -243
  184. data/VERSION.yml +0 -5
  185. data/init.rb +0 -1
@@ -4,7 +4,7 @@ describe Sphinx::Client, 'disconnected' do
4
4
  before :each do
5
5
  @sphinx = Sphinx::Client.new
6
6
  end
7
-
7
+
8
8
  context 'in SetServer method' do
9
9
  it 'should raise an error when host is not String' do
10
10
  expect {
@@ -66,7 +66,7 @@ describe Sphinx::Client, 'disconnected' do
66
66
  }.to raise_error(ArgumentError)
67
67
  end
68
68
  end
69
-
69
+
70
70
  context 'in SetLimits method' do
71
71
  it 'should raise an error when offset is not Integer' do
72
72
  expect {
@@ -131,7 +131,7 @@ describe Sphinx::Client, 'disconnected' do
131
131
  }.to raise_error(ArgumentError)
132
132
  end
133
133
  end
134
-
134
+
135
135
  context 'in SetMatchMode method' do
136
136
  it 'should raise an error when mode is not Integer, String or Symbol' do
137
137
  expect {
@@ -174,8 +174,14 @@ describe Sphinx::Client, 'disconnected' do
174
174
  @sphinx.SetRankingMode(100)
175
175
  }.to raise_error(ArgumentError)
176
176
  end
177
+
178
+ it 'should raise an error when ranker is expr and expression is not specified' do
179
+ expect {
180
+ @sphinx.SetRankingMode(:expr)
181
+ }.to raise_error(ArgumentError)
182
+ end
177
183
  end
178
-
184
+
179
185
  context 'in SetSortMode method' do
180
186
  it 'should raise an error when mode is not Integer, String or Symbol' do
181
187
  expect {
@@ -209,7 +215,7 @@ describe Sphinx::Client, 'disconnected' do
209
215
  }.to raise_error(ArgumentError)
210
216
  end
211
217
  end
212
-
218
+
213
219
  context 'in SetWeights method' do
214
220
  it 'should raise an error when weights is not Array' do
215
221
  expect {
@@ -694,7 +700,7 @@ describe Sphinx::Client, 'disconnected' do
694
700
  }.to_not raise_error(ArgumentError)
695
701
  end
696
702
  end
697
-
703
+
698
704
  context 'in SetSelect method' do
699
705
  it 'should raise an error when select is not String' do
700
706
  expect {
@@ -710,7 +716,55 @@ describe Sphinx::Client, 'disconnected' do
710
716
  }.to_not raise_error(ArgumentError)
711
717
  end
712
718
  end
713
-
719
+
720
+ context 'in SetQueryFlag method' do
721
+ it 'should raise an error when unknown flag passed' do
722
+ expect {
723
+ @sphinx.SetQueryFlag('unknown', 1)
724
+ }.to raise_error(ArgumentError)
725
+ end
726
+
727
+ [ :reverse_scan, :sort_method, :max_predicted_time, :boolean_simplify, :idf ].each do |flag|
728
+ it "should raise an error when #{flag} flag has incorrect value" do
729
+ expect {
730
+ @sphinx.SetQueryFlag(flag, 'invalid')
731
+ }.to raise_error(ArgumentError)
732
+ end
733
+ end
734
+
735
+ it "should raise an error when :max_predicted_time flag has negative value" do
736
+ expect {
737
+ @sphinx.SetQueryFlag(:max_predicted_time, -1)
738
+ }.to raise_error(ArgumentError)
739
+ end
740
+ end
741
+
742
+ context 'in SetOuterSelect method' do
743
+ it 'should raise an error when orderby is not a String' do
744
+ expect {
745
+ @sphinx.SetOuterSelect([], 0, 1)
746
+ }.to raise_error(ArgumentError)
747
+ end
748
+
749
+ it 'should raise an error when offset is not an Integer' do
750
+ expect {
751
+ @sphinx.SetOuterSelect('sortby', 'a', 1)
752
+ }.to raise_error(ArgumentError)
753
+ end
754
+
755
+ it 'should raise an error when offset is negative' do
756
+ expect {
757
+ @sphinx.SetOuterSelect('sortby', -1, 1)
758
+ }.to raise_error(ArgumentError)
759
+ end
760
+
761
+ it 'should raise an error when limit is less than 1' do
762
+ expect {
763
+ @sphinx.SetOuterSelect('sortby', 1, 0)
764
+ }.to raise_error(ArgumentError)
765
+ end
766
+ end
767
+
714
768
  context 'in BuildExcerpts method' do
715
769
  it 'should raise an error when docs is not Array of Strings' do
716
770
  expect {
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->Query('query');
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->Query('query', 'index');
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->BuildExcerpts(array('10', '20'), 'index', 'word1 word2', array('before_match' => 'before',
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->BuildExcerpts(array('10', '20'), 'index', 'word1 word2');
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->BuildExcerpts(array('10', '20'), 'index', 'word1 word2', array('exact_phrase' => true,
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFieldWeights(array('field1' => 10, 'field2' => 20));
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilter('attr', array(10, 20, 30));
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilter('attr', array(10, 20, 30), true);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterFloatRange('attr', 10.5, 20.3);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterFloatRange('attr', 10.5, 20.3, true);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterRange('attr', 10, 20);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterRange('attr', 10, 20, true);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterRange('attr1', -10, 20);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterRange('attr2', 30, 40);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilter('attr2', array(40, 50));
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetFilterRange('attr1', 10, 20, true);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGeoAnchor('attrlat', 'attrlong', 20.3, 40.7);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_ATTR);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_ATTRPAIR);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_DAY);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_DAY, 'somesort');
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_MONTH);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_WEEK);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_YEAR);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetGroupBy('attr', SPH_GROUPBY_DAY);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetIDRange(10, 20);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetIDRange(8589934591, 17179869183);
@@ -1,6 +1,6 @@
1
1
  <?php
2
2
 
3
- require ("sphinxapi.php");
3
+ require ("spec/fixtures/sphinxapi.php");
4
4
 
5
5
  $cl = new SphinxClient();
6
6
  $cl->SetIndexWeights(array('index1' => 10, 'index2' => 20));