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
@@ -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->BuildKeywords('test', 'index', 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->SetLimits(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->SetLimits(10, 20, 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->SetLimits(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->SetLimits(10, 20, 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->SetMatchMode(SPH_MATCH_ALL);
@@ -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->SetMatchMode(SPH_MATCH_ANY);
@@ -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->SetMatchMode(SPH_MATCH_BOOLEAN);
@@ -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->SetMatchMode(SPH_MATCH_EXTENDED);
@@ -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->SetMatchMode(SPH_MATCH_EXTENDED2);
@@ -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->SetMatchMode(SPH_MATCH_FULLSCAN);
@@ -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->SetMatchMode(SPH_MATCH_PHRASE);
@@ -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->SetMaxQueryTime(1000);
@@ -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->SetRetries(10, 20);
@@ -0,0 +1,9 @@
1
+ <?php
2
+
3
+ require ("spec/fixtures/sphinxapi.php");
4
+
5
+ $cl = new SphinxClient();
6
+ $cl->SetOuterSelect('attr', 10, 100);
7
+ $cl->Query('query');
8
+
9
+ ?>
@@ -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->SetOverride('attr1', SPH_ATTR_INTEGER, array(10 => 20));
@@ -0,0 +1,13 @@
1
+ <?php
2
+
3
+ require ("spec/fixtures/sphinxapi.php");
4
+
5
+ $cl = new SphinxClient();
6
+ $cl->SetQueryFlag('reverse_scan', 1);
7
+ $cl->SetQueryFlag('sort_method', 'kbuffer');
8
+ $cl->SetQueryFlag('max_predicted_time', 15);
9
+ $cl->SetQueryFlag('boolean_simplify', true);
10
+ $cl->SetQueryFlag('idf', 'plain');
11
+ $cl->Query('query');
12
+
13
+ ?>
@@ -0,0 +1,19 @@
1
+ <?php
2
+
3
+ require ("spec/fixtures/sphinxapi.php");
4
+
5
+ $cl = new SphinxClient();
6
+ $cl->SetQueryFlag('reverse_scan', 1);
7
+ $cl->SetQueryFlag('sort_method', 'kbuffer');
8
+ $cl->SetQueryFlag('max_predicted_time', 15);
9
+ $cl->SetQueryFlag('boolean_simplify', true);
10
+ $cl->SetQueryFlag('idf', 'plain');
11
+
12
+ $cl->SetQueryFlag('reverse_scan', 0);
13
+ $cl->SetQueryFlag('sort_method', 'pq');
14
+ $cl->SetQueryFlag('max_predicted_time', 0);
15
+ $cl->SetQueryFlag('boolean_simplify', false);
16
+ $cl->SetQueryFlag('idf', 'normalized');
17
+ $cl->Query('query');
18
+
19
+ ?>
@@ -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->SetRankingMode(SPH_RANK_BM25);
@@ -0,0 +1,9 @@
1
+ <?php
2
+
3
+ require ("spec/fixtures/sphinxapi.php");
4
+
5
+ $cl = new SphinxClient();
6
+ $cl->SetRankingMode(SPH_RANK_EXPR, 'sum(lcs*user_weight)*1000+bm25');
7
+ $cl->Query('query');
8
+
9
+ ?>
@@ -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->SetRankingMode(SPH_RANK_FIELDMASK);
@@ -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->SetRankingMode(SPH_RANK_MATCHANY);
@@ -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->SetRankingMode(SPH_RANK_NONE);
@@ -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->SetRankingMode(SPH_RANK_PROXIMITY);
@@ -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->SetRankingMode(SPH_RANK_PROXIMITY_BM25);
@@ -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->SetRankingMode(SPH_RANK_SPH04);
@@ -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->SetRankingMode(SPH_RANK_WORDCOUNT);
@@ -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->SetRetries(10);
@@ -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->SetRetries(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->SetSelect('attr1, attr2');
@@ -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->SetSortMode(SPH_SORT_ATTR_ASC, 'sortby');
@@ -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->SetSortMode(SPH_SORT_ATTR_DESC, 'sortby');
@@ -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->SetSortMode(SPH_SORT_EXPR, 'sortby');
@@ -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->SetSortMode(SPH_SORT_EXTENDED, 'sortby');
@@ -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->SetSortMode(SPH_SORT_RELEVANCE);
@@ -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->SetSortMode(SPH_SORT_TIME_SEGMENTS, 'sortby');
@@ -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->UpdateAttributes('index', array('group'), array(123 => array(456)));
@@ -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->UpdateAttributes('index', array('group', 'category'), array(123 => array(array(456, 789), array(1, 2, 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->SetWeights(array(10, 20, 30, 40));
@@ -0,0 +1,2 @@
1
+
2
+ Fatal error: Call to undefined method SphinxClient::FlushAttrs() in /work/sphinx/sphinx.git/spec/fixtures/responses/php/flush_attrs.php on line 6
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ <?php
2
+
3
+ require ("spec/fixtures/sphinxapi.php");
4
+
5
+ $cl = new SphinxClient();
6
+ $cl->BuildExcerpts(array('what the world', 'London is the capital of Great Britain'), 'test1', 'the');
7
+
8
+ ?>
@@ -0,0 +1,8 @@
1
+ <?php
2
+
3
+ require ("spec/fixtures/sphinxapi.php");
4
+
5
+ $cl = new SphinxClient();
6
+ $cl->BuildKeywords('wifi gprs', 'test1', true);
7
+
8
+ ?>