ultrasphinx 1.6.7 → 1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +2 -0
  3. data/DEPLOYMENT_NOTES +29 -0
  4. data/Manifest +7 -2
  5. data/RAKE_TASKS +15 -0
  6. data/README +14 -17
  7. data/TODO +7 -1
  8. data/examples/default.base +16 -2
  9. data/lib/ultrasphinx.rb +2 -2
  10. data/lib/ultrasphinx/associations.rb +25 -0
  11. data/lib/ultrasphinx/configure.rb +26 -16
  12. data/lib/ultrasphinx/fields.rb +7 -4
  13. data/lib/ultrasphinx/is_indexed.rb +37 -25
  14. data/lib/ultrasphinx/search.rb +1 -0
  15. data/lib/ultrasphinx/search/internals.rb +10 -3
  16. data/lib/ultrasphinx/search/parser.rb +14 -11
  17. data/lib/ultrasphinx/ultrasphinx.rb +6 -4
  18. data/test/integration/app/app/models/geo/address.rb +1 -1
  19. data/test/integration/app/app/models/geo/country.rb +4 -0
  20. data/test/integration/app/config/boot.rb +95 -32
  21. data/test/integration/app/config/environment.rb +4 -1
  22. data/test/integration/app/config/environments/development.rb +4 -4
  23. data/test/integration/app/config/ultrasphinx/development.conf.canonical +45 -13
  24. data/test/integration/app/db/migrate/009_create_countries.rb +11 -0
  25. data/test/integration/app/test/fixtures/countries.yml +1 -0
  26. data/test/integration/configure_test.rb +14 -11
  27. data/test/integration/search_test.rb +1 -0
  28. data/test/integration/server_test.rb +2 -2
  29. data/test/setup.rb +0 -3
  30. data/test/teardown.rb +0 -0
  31. data/test/test_helper.rb +1 -6
  32. data/ultrasphinx.gemspec +21 -7
  33. data/vendor/riddle/README +2 -2
  34. data/vendor/riddle/Rakefile +94 -0
  35. data/vendor/riddle/lib/riddle.rb +1 -1
  36. data/vendor/riddle/lib/riddle/client.rb +18 -6
  37. data/vendor/riddle/lib/riddle/client/filter.rb +3 -1
  38. data/vendor/riddle/lib/riddle/client/message.rb +1 -1
  39. data/vendor/riddle/lib/riddle/client/response.rb +1 -1
  40. data/vendor/riddle/spec/fixtures/data/anchor.bin +0 -0
  41. data/vendor/riddle/spec/fixtures/data/filter_floats.bin +0 -0
  42. data/vendor/riddle/spec/fixtures/data/filter_floats_exclude.bin +0 -0
  43. data/vendor/riddle/spec/sphinx_helper.rb +1 -0
  44. data/vendor/riddle/spec/unit/message_spec.rb +3 -3
  45. data/vendor/riddle/spec/unit/response_spec.rb +2 -2
  46. metadata +10 -5
  47. metadata.gz.sig +0 -0
  48. data/test/integration/app/config/ultrasphinx/development.conf +0 -159
  49. data/test/integration/app/db/schema.rb +0 -52
metadata.gz.sig CHANGED
Binary file
@@ -1,159 +0,0 @@
1
-
2
- # Auto-generated at Wed Dec 12 12:09:45 -0500 2007.
3
- # Hand modifications will be overwritten.
4
- # /Users/eweaver/Desktop/projects/chow/vendor/plugins/ultrasphinx/test/integration/app/config/ultrasphinx/default.base
5
- indexer {
6
- mem_limit = 256M
7
- }
8
- searchd {
9
- read_timeout = 5
10
- max_children = 300
11
- log = /tmp/sphinx/searchd.log
12
- port = 3313
13
- max_matches = 100000
14
- query_log = /tmp/sphinx/query.log
15
- pid_file = /tmp/sphinx/searchd.pid
16
- address = 0.0.0.0
17
- }
18
-
19
- # Source configuration
20
-
21
- source geo__states
22
- {
23
- strip_html = 0
24
- sql_range_step = 20000
25
- index_html_attrs =
26
- sql_query_post =
27
-
28
- type = mysql
29
- sql_query_pre = SET SESSION group_concat_max_len = 65535
30
- sql_query_pre = SET NAMES utf8
31
-
32
- sql_db = ultrasphinx_development
33
- sql_host = localhost
34
- sql_pass =
35
- sql_user = root
36
- sql_query_range = SELECT MIN(id), MAX(id) FROM states
37
- sql_query = SELECT (states.id * 4 + 0) AS id, CAST(GROUP_CONCAT(DISTINCT addresses.name SEPARATOR ' ') AS CHAR) AS address_name, 0 AS capitalization, 'Geo::State' AS class, 0 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, '' AS company_two, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM states LEFT OUTER JOIN addresses AS addresses ON states.id = addresses.state_id WHERE states.id >= $start AND states.id <= $end GROUP BY states.id
38
-
39
- sql_group_column = capitalization
40
- sql_group_column = class_id
41
- sql_group_column = company_name_facet
42
- sql_date_column = created_at
43
- sql_group_column = deleted
44
- sql_str2ordinal_column = mission_statement
45
- sql_group_column = user_id
46
- sql_query_info = SELECT * FROM states WHERE states.id = (($id - 0) / 4)
47
- }
48
-
49
-
50
- # Source configuration
51
-
52
- source sellers
53
- {
54
- strip_html = 0
55
- sql_range_step = 20000
56
- index_html_attrs =
57
- sql_query_post =
58
-
59
- type = mysql
60
- sql_query_pre = SET SESSION group_concat_max_len = 65535
61
- sql_query_pre = SET NAMES utf8
62
-
63
- sql_db = ultrasphinx_development
64
- sql_host = localhost
65
- sql_pass =
66
- sql_user = root
67
- sql_query_range = SELECT MIN(id), MAX(id) FROM sellers
68
- sql_query = SELECT (sellers.id * 4 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, sellers.company_name AS company_name, CRC32(sellers.company_name) AS company_name_facet, '' AS company_two, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '' AS login, sellers.mission_statement AS mission_statement, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end GROUP BY sellers.id
69
-
70
- sql_group_column = capitalization
71
- sql_group_column = class_id
72
- sql_group_column = company_name_facet
73
- sql_date_column = created_at
74
- sql_group_column = deleted
75
- sql_str2ordinal_column = mission_statement
76
- sql_group_column = user_id
77
- sql_query_info = SELECT * FROM sellers WHERE sellers.id = (($id - 1) / 4)
78
- }
79
-
80
-
81
- # Source configuration
82
-
83
- source geo__addresses
84
- {
85
- strip_html = 0
86
- sql_range_step = 20000
87
- index_html_attrs =
88
- sql_query_post =
89
-
90
- type = mysql
91
- sql_query_pre = SET SESSION group_concat_max_len = 65535
92
- sql_query_pre = SET NAMES utf8
93
-
94
- sql_db = ultrasphinx_development
95
- sql_host = localhost
96
- sql_pass =
97
- sql_user = root
98
- sql_query_range = SELECT MIN(id), MAX(id) FROM addresses
99
- sql_query = SELECT (addresses.id * 4 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, '' AS company_two, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, addresses.name AS name, states.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states AS states ON states.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY addresses.id
100
-
101
- sql_group_column = capitalization
102
- sql_group_column = class_id
103
- sql_group_column = company_name_facet
104
- sql_date_column = created_at
105
- sql_group_column = deleted
106
- sql_str2ordinal_column = mission_statement
107
- sql_group_column = user_id
108
- sql_query_info = SELECT * FROM addresses WHERE addresses.id = (($id - 2) / 4)
109
- }
110
-
111
-
112
- # Source configuration
113
-
114
- source users
115
- {
116
- strip_html = 0
117
- sql_range_step = 20000
118
- index_html_attrs =
119
- sql_query_post =
120
-
121
- type = mysql
122
- sql_query_pre = SET SESSION group_concat_max_len = 65535
123
- sql_query_pre = SET NAMES utf8
124
-
125
- sql_db = ultrasphinx_development
126
- sql_host = localhost
127
- sql_pass =
128
- sql_user = root
129
- sql_query_range = SELECT MIN(id), MAX(id) FROM users
130
- sql_query = SELECT (users.id * 4 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, sellers.company_name AS company, '' AS company_name, 0 AS company_name_facet, REPLACE(sellers_two.company_name, '6', ' replacement ') AS company_two, '' AS content, 18000 AS created_at, users.deleted AS deleted, users.email AS email, users.login AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers AS sellers ON users.id = sellers.user_id LEFT OUTER JOIN sellers AS sellers_two ON users.id = sellers_two.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = '0') GROUP BY users.id
131
-
132
- sql_group_column = capitalization
133
- sql_group_column = class_id
134
- sql_group_column = company_name_facet
135
- sql_date_column = created_at
136
- sql_group_column = deleted
137
- sql_str2ordinal_column = mission_statement
138
- sql_group_column = user_id
139
- sql_query_info = SELECT * FROM users WHERE users.id = (($id - 3) / 4)
140
- }
141
-
142
-
143
- # Index configuration
144
-
145
- index complete
146
- {
147
- source = geo__addresses
148
- source = geo__states
149
- source = sellers
150
- source = users
151
- charset_type = utf-8
152
- charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
153
- min_word_len = 1
154
- stopwords =
155
- path = /tmp/sphinx//sphinx_index_complete
156
- docinfo = extern
157
- morphology = stem_en
158
- }
159
-
@@ -1,52 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead of editing this file,
2
- # please use the migrations feature of ActiveRecord to incrementally modify your database, and
3
- # then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
- # to create the application database on another system, you should be using db:schema:load, not running
7
- # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
- # you'll amass, the slower it'll run and the greater likelihood for issues).
9
- #
10
- # It's strongly recommended to check this file into your version control system.
11
-
12
- ActiveRecord::Schema.define(:version => 8) do
13
-
14
- create_table "addresses", :force => true do |t|
15
- t.integer "user_id", :null => false
16
- t.string "name"
17
- t.string "line_1", :default => "", :null => false
18
- t.string "line_2"
19
- t.string "city", :default => "", :null => false
20
- t.integer "state_id", :null => false
21
- t.string "province_region"
22
- t.string "zip_postal_code"
23
- t.integer "country_id", :null => false
24
- t.float "lat"
25
- t.float "long"
26
- end
27
-
28
- create_table "sellers", :force => true do |t|
29
- t.integer "user_id", :null => false
30
- t.string "company_name"
31
- t.datetime "created_at"
32
- t.datetime "updated_at"
33
- t.float "capitalization", :default => 0.0
34
- t.string "mission_statement"
35
- end
36
-
37
- create_table "states", :force => true do |t|
38
- t.string "name", :default => "", :null => false
39
- t.string "abbreviation", :default => "", :null => false
40
- end
41
-
42
- create_table "users", :force => true do |t|
43
- t.string "login", :limit => 64, :default => "", :null => false
44
- t.string "email", :default => "", :null => false
45
- t.string "crypted_password", :limit => 64, :default => "", :null => false
46
- t.string "salt", :limit => 64, :default => "", :null => false
47
- t.datetime "created_at"
48
- t.datetime "updated_at"
49
- t.boolean "deleted", :default => false
50
- end
51
-
52
- end