cheap_skate 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README +22 -2
- data/lib/cheap_skate/schema.rb +6 -4
- metadata +3 -3
data/README
CHANGED
@@ -10,6 +10,28 @@ Requirements:
|
|
10
10
|
json
|
11
11
|
faster_csv
|
12
12
|
|
13
|
+
Installation:
|
14
|
+
gem install cheap_skate
|
15
|
+
|
16
|
+
Getting Started:
|
17
|
+
$ cheapskate init my_new_cheapskate_project
|
18
|
+
|
19
|
+
Note the 'project name' needs to be something that can be easily turned into a Ruby symbol. Use underscores instead of dashes, don't start with a number, etc.
|
20
|
+
This (rake task) will create a new directory with subdirectories to store your CheapSkate configuration, Ferret index, logs, etc.
|
21
|
+
|
22
|
+
If you have an existing application with predefined schema.xml:
|
23
|
+
|
24
|
+
$ cd my_new_cheapskate_project
|
25
|
+
$ cheapskate convertschema xml=/path/to/schema.xml
|
26
|
+
|
27
|
+
This will take your existing schema document and migrate it to CheapSkate's YAML-based schema (as ./conf/schema.yml).
|
28
|
+
|
29
|
+
Modify ./conf/cheapskate.yml to taste.
|
30
|
+
|
31
|
+
$ rackup config.ru
|
32
|
+
|
33
|
+
Point a web client at http://localhost:9292/, you should see a "Welcome to CheapSkate" message.
|
34
|
+
|
13
35
|
Caveats:
|
14
36
|
|
15
37
|
CheapSkate isn't really intended to replace Solr. If you need something that scales to millions of documents or performs replication or does all the neat things Solr does, use Solr.
|
@@ -20,6 +42,4 @@ Todos:
|
|
20
42
|
|
21
43
|
Provide field boosting and analyzers both during index as well as query.
|
22
44
|
|
23
|
-
Add the MoreLikeThis analyzer from acts_as_ferret.
|
24
|
-
|
25
45
|
Add more responseWriters (starting with XML).
|
data/lib/cheap_skate/schema.rb
CHANGED
@@ -138,10 +138,12 @@ module CheapSkate
|
|
138
138
|
conf['schema']['types'].keys.each do |type|
|
139
139
|
@field_types[type.to_sym] = conf['schema']['types'][type]
|
140
140
|
end
|
141
|
-
conf['schema']['copyFields']
|
142
|
-
|
143
|
-
|
144
|
-
|
141
|
+
if conf['schema']['copyFields']
|
142
|
+
conf['schema']['copyFields'].each do |copy|
|
143
|
+
copy.each_pair do | orig, dest|
|
144
|
+
@copy_fields[orig.to_sym] ||= []
|
145
|
+
@copy_fields[orig.to_sym] << dest.to_sym
|
146
|
+
end
|
145
147
|
end
|
146
148
|
end
|
147
149
|
@id_field = (conf['schema']['uniqueKey'] || "id").to_sym
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 8
|
9
|
+
version: 0.0.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ross Singer
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-04 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|