muck-services 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/muck/recommendations_controller.rb +21 -6
- data/app/models/entry.rb +7 -10
- data/app/views/recommendations/get_button.html.erb +5 -0
- data/app/views/recommendations/index.pjs.erb +1 -1
- data/app/views/recommendations/index.xml.builder +4 -6
- data/app/views/recommendations/real_time.html.erb +13 -0
- data/app/views/recommendations/{index_real_time.pjs.erb → real_time.pjs.erb} +0 -0
- data/app/views/recommendations/{index_real_time.xml.builder → real_time.xml.builder} +1 -1
- data/config/muck_services_routes.rb +3 -0
- data/locales/en.yml +2 -1
- data/muck-services.gemspec +8 -52
- data/public/images/folksemantic/logo-folksemantic-gm.gif +0 -0
- data/public/javascripts/recommenderextension.user.js +392 -0
- data/test/rails_root/config/environment.rb +7 -6
- data/test/rails_root/config/environments/test.rb +0 -10
- data/test/rails_root/db/migrate/20090602191243_create_muck_raker.rb +4 -19
- data/test/rails_root/db/migrate/20090703175825_denormalize_entries_subjects.rb +3 -29
- data/test/rails_root/db/migrate/20090717175825_normalize_entries_subjects.rb +3 -32
- data/test/rails_root/test/factories.rb +0 -145
- data/test/rails_root/test/functional/topics_controller_test.rb +4 -0
- data/test/rails_root/test/test_helper.rb +5 -40
- data/test/rails_root/test/unit/share_test.rb +3 -0
- data/test/rails_root/test/unit/user_test.rb +3 -0
- metadata +8 -52
- data/app/views/recommendations/index_js.pjs.erb +0 -39
- data/config/solr/README.txt +0 -0
- data/config/solr/cores/de/conf/protwords.txt +0 -21
- data/config/solr/cores/de/conf/schema.xml +0 -81
- data/config/solr/cores/de/conf/solrconfig.xml +0 -311
- data/config/solr/cores/de/conf/stopwords.txt +0 -341
- data/config/solr/cores/de/conf/synonyms.txt +0 -31
- data/config/solr/cores/en/conf/protwords.txt +0 -21
- data/config/solr/cores/en/conf/schema.xml +0 -83
- data/config/solr/cores/en/conf/solrconfig.xml +0 -311
- data/config/solr/cores/en/conf/stopwords.txt +0 -341
- data/config/solr/cores/en/conf/synonyms.txt +0 -31
- data/config/solr/cores/es/conf/protwords.txt +0 -21
- data/config/solr/cores/es/conf/schema.xml +0 -81
- data/config/solr/cores/es/conf/solrconfig.xml +0 -311
- data/config/solr/cores/es/conf/stopwords.txt +0 -206
- data/config/solr/cores/es/conf/synonyms.txt +0 -31
- data/config/solr/cores/fr/conf/protwords.txt +0 -21
- data/config/solr/cores/fr/conf/schema.xml +0 -82
- data/config/solr/cores/fr/conf/solrconfig.xml +0 -311
- data/config/solr/cores/fr/conf/stopwords.txt +0 -57
- data/config/solr/cores/fr/conf/synonyms.txt +0 -31
- data/config/solr/cores/ja/conf/protwords.txt +0 -21
- data/config/solr/cores/ja/conf/schema.xml +0 -69
- data/config/solr/cores/ja/conf/solrconfig.xml +0 -311
- data/config/solr/cores/ja/conf/stopwords.txt +0 -341
- data/config/solr/cores/ja/conf/synonyms.txt +0 -31
- data/config/solr/cores/nl/conf/protwords.txt +0 -21
- data/config/solr/cores/nl/conf/schema.xml +0 -78
- data/config/solr/cores/nl/conf/solrconfig.xml +0 -311
- data/config/solr/cores/nl/conf/stopwords.txt +0 -45691
- data/config/solr/cores/nl/conf/synonyms.txt +0 -31
- data/config/solr/cores/ru/conf/protwords.txt +0 -21
- data/config/solr/cores/ru/conf/schema.xml +0 -78
- data/config/solr/cores/ru/conf/solrconfig.xml +0 -311
- data/config/solr/cores/ru/conf/stopwords.txt +0 -341
- data/config/solr/cores/ru/conf/synonyms.txt +0 -31
- data/config/solr/cores/zh/conf/protwords.txt +0 -21
- data/config/solr/cores/zh/conf/schema.xml +0 -72
- data/config/solr/cores/zh/conf/solrconfig.xml +0 -311
- data/config/solr/cores/zh/conf/stopwords.txt +0 -341
- data/config/solr/cores/zh/conf/synonyms.txt +0 -31
- data/config/solr/solr.xml +0 -50
- data/test/rails_root/test/shoulda_macros/controller.rb +0 -49
- data/test/rails_root/test/shoulda_macros/forms.rb +0 -32
- data/test/rails_root/test/shoulda_macros/models.rb +0 -50
- data/test/rails_root/test/shoulda_macros/pagination.rb +0 -53
- data/test/rails_root/test/shoulda_macros/plugins.rb +0 -34
@@ -1,341 +0,0 @@
|
|
1
|
-
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
-
# contributor license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright ownership.
|
4
|
-
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
-
# (the "License"); you may not use this file except in compliance with
|
6
|
-
# the License. You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
# See the License for the specific language governing permissions and
|
14
|
-
# limitations under the License.
|
15
|
-
|
16
|
-
#-----------------------------------------------------------------------
|
17
|
-
# a couple of test stopwords to test that the words are really being
|
18
|
-
# configured from this file:
|
19
|
-
stopworda
|
20
|
-
stopwordb
|
21
|
-
|
22
|
-
#stopwords list i found on the internet
|
23
|
-
a
|
24
|
-
about
|
25
|
-
above
|
26
|
-
across
|
27
|
-
after
|
28
|
-
afterwards
|
29
|
-
again
|
30
|
-
against
|
31
|
-
all
|
32
|
-
almost
|
33
|
-
alone
|
34
|
-
along
|
35
|
-
already
|
36
|
-
also
|
37
|
-
although
|
38
|
-
always
|
39
|
-
am
|
40
|
-
among
|
41
|
-
amongst
|
42
|
-
amoungst
|
43
|
-
amount
|
44
|
-
an
|
45
|
-
and
|
46
|
-
another
|
47
|
-
any
|
48
|
-
anyhow
|
49
|
-
anyone
|
50
|
-
anything
|
51
|
-
anyway
|
52
|
-
anywhere
|
53
|
-
are
|
54
|
-
around
|
55
|
-
as
|
56
|
-
at
|
57
|
-
back
|
58
|
-
be
|
59
|
-
became
|
60
|
-
because
|
61
|
-
become
|
62
|
-
becomes
|
63
|
-
becoming
|
64
|
-
been
|
65
|
-
before
|
66
|
-
beforehand
|
67
|
-
behind
|
68
|
-
being
|
69
|
-
below
|
70
|
-
beside
|
71
|
-
besides
|
72
|
-
between
|
73
|
-
beyond
|
74
|
-
bill
|
75
|
-
both
|
76
|
-
bottom
|
77
|
-
but
|
78
|
-
by
|
79
|
-
call
|
80
|
-
can
|
81
|
-
cannot
|
82
|
-
cant
|
83
|
-
co
|
84
|
-
computer
|
85
|
-
con
|
86
|
-
could
|
87
|
-
couldnt
|
88
|
-
cry
|
89
|
-
de
|
90
|
-
describe
|
91
|
-
detail
|
92
|
-
do
|
93
|
-
done
|
94
|
-
down
|
95
|
-
due
|
96
|
-
during
|
97
|
-
each
|
98
|
-
eg
|
99
|
-
eight
|
100
|
-
either
|
101
|
-
eleven
|
102
|
-
else
|
103
|
-
elsewhere
|
104
|
-
empty
|
105
|
-
enough
|
106
|
-
etc
|
107
|
-
even
|
108
|
-
ever
|
109
|
-
every
|
110
|
-
everyone
|
111
|
-
everything
|
112
|
-
everywhere
|
113
|
-
except
|
114
|
-
few
|
115
|
-
fifteen
|
116
|
-
fify
|
117
|
-
fill
|
118
|
-
find
|
119
|
-
fire
|
120
|
-
first
|
121
|
-
five
|
122
|
-
for
|
123
|
-
former
|
124
|
-
formerly
|
125
|
-
forty
|
126
|
-
found
|
127
|
-
four
|
128
|
-
from
|
129
|
-
front
|
130
|
-
full
|
131
|
-
further
|
132
|
-
get
|
133
|
-
give
|
134
|
-
go
|
135
|
-
had
|
136
|
-
has
|
137
|
-
hasnt
|
138
|
-
have
|
139
|
-
he
|
140
|
-
hence
|
141
|
-
her
|
142
|
-
here
|
143
|
-
hereafter
|
144
|
-
hereby
|
145
|
-
herein
|
146
|
-
hereupon
|
147
|
-
hers
|
148
|
-
herself
|
149
|
-
him
|
150
|
-
himself
|
151
|
-
his
|
152
|
-
how
|
153
|
-
however
|
154
|
-
hundred
|
155
|
-
i
|
156
|
-
ie
|
157
|
-
if
|
158
|
-
in
|
159
|
-
inc
|
160
|
-
indeed
|
161
|
-
interest
|
162
|
-
into
|
163
|
-
is
|
164
|
-
it
|
165
|
-
its
|
166
|
-
itself
|
167
|
-
keep
|
168
|
-
last
|
169
|
-
latter
|
170
|
-
latterly
|
171
|
-
least
|
172
|
-
less
|
173
|
-
ltd
|
174
|
-
made
|
175
|
-
many
|
176
|
-
may
|
177
|
-
me
|
178
|
-
meanwhile
|
179
|
-
might
|
180
|
-
mill
|
181
|
-
mine
|
182
|
-
more
|
183
|
-
moreover
|
184
|
-
most
|
185
|
-
mostly
|
186
|
-
move
|
187
|
-
much
|
188
|
-
must
|
189
|
-
my
|
190
|
-
myself
|
191
|
-
name
|
192
|
-
namely
|
193
|
-
neither
|
194
|
-
never
|
195
|
-
nevertheless
|
196
|
-
next
|
197
|
-
nine
|
198
|
-
no
|
199
|
-
nobody
|
200
|
-
none
|
201
|
-
noone
|
202
|
-
nor
|
203
|
-
not
|
204
|
-
nothing
|
205
|
-
now
|
206
|
-
nowhere
|
207
|
-
of
|
208
|
-
off
|
209
|
-
often
|
210
|
-
on
|
211
|
-
once
|
212
|
-
one
|
213
|
-
only
|
214
|
-
onto
|
215
|
-
or
|
216
|
-
other
|
217
|
-
others
|
218
|
-
otherwise
|
219
|
-
our
|
220
|
-
ours
|
221
|
-
ourselves
|
222
|
-
out
|
223
|
-
over
|
224
|
-
own
|
225
|
-
part
|
226
|
-
per
|
227
|
-
perhaps
|
228
|
-
please
|
229
|
-
put
|
230
|
-
rather
|
231
|
-
re
|
232
|
-
same
|
233
|
-
see
|
234
|
-
seem
|
235
|
-
seemed
|
236
|
-
seeming
|
237
|
-
seems
|
238
|
-
serious
|
239
|
-
several
|
240
|
-
she
|
241
|
-
should
|
242
|
-
show
|
243
|
-
side
|
244
|
-
since
|
245
|
-
sincere
|
246
|
-
six
|
247
|
-
sixty
|
248
|
-
so
|
249
|
-
some
|
250
|
-
somehow
|
251
|
-
someone
|
252
|
-
something
|
253
|
-
sometime
|
254
|
-
sometimes
|
255
|
-
somewhere
|
256
|
-
still
|
257
|
-
such
|
258
|
-
system
|
259
|
-
take
|
260
|
-
ten
|
261
|
-
than
|
262
|
-
that
|
263
|
-
the
|
264
|
-
their
|
265
|
-
them
|
266
|
-
themselves
|
267
|
-
then
|
268
|
-
thence
|
269
|
-
there
|
270
|
-
thereafter
|
271
|
-
thereby
|
272
|
-
therefore
|
273
|
-
therein
|
274
|
-
thereupon
|
275
|
-
these
|
276
|
-
they
|
277
|
-
thick
|
278
|
-
thin
|
279
|
-
third
|
280
|
-
this
|
281
|
-
those
|
282
|
-
though
|
283
|
-
three
|
284
|
-
through
|
285
|
-
throughout
|
286
|
-
thru
|
287
|
-
thus
|
288
|
-
to
|
289
|
-
together
|
290
|
-
too
|
291
|
-
top
|
292
|
-
toward
|
293
|
-
towards
|
294
|
-
twelve
|
295
|
-
twenty
|
296
|
-
two
|
297
|
-
un
|
298
|
-
under
|
299
|
-
until
|
300
|
-
up
|
301
|
-
upon
|
302
|
-
us
|
303
|
-
very
|
304
|
-
via
|
305
|
-
was
|
306
|
-
we
|
307
|
-
well
|
308
|
-
were
|
309
|
-
what
|
310
|
-
whatever
|
311
|
-
when
|
312
|
-
whence
|
313
|
-
whenever
|
314
|
-
where
|
315
|
-
whereafter
|
316
|
-
whereas
|
317
|
-
whereby
|
318
|
-
wherein
|
319
|
-
whereupon
|
320
|
-
wherever
|
321
|
-
whether
|
322
|
-
which
|
323
|
-
while
|
324
|
-
whither
|
325
|
-
who
|
326
|
-
whoever
|
327
|
-
whole
|
328
|
-
whom
|
329
|
-
whose
|
330
|
-
why
|
331
|
-
will
|
332
|
-
with
|
333
|
-
within
|
334
|
-
without
|
335
|
-
would
|
336
|
-
yet
|
337
|
-
you
|
338
|
-
your
|
339
|
-
yours
|
340
|
-
yourself
|
341
|
-
yourselves
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
-
# (the "License"); you may not use this file except in compliance with
|
3
|
-
# the License. You may obtain a copy of the License at
|
4
|
-
#
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
-
#
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
-
# See the License for the specific language governing permissions and
|
11
|
-
# limitations under the License.
|
12
|
-
|
13
|
-
#-----------------------------------------------------------------------
|
14
|
-
#some test synonym mappings unlikely to appear in real input text
|
15
|
-
aaa => aaaa
|
16
|
-
bbb => bbbb1 bbbb2
|
17
|
-
ccc => cccc1,cccc2
|
18
|
-
a\=>a => b\=>b
|
19
|
-
a\,a => b\,b
|
20
|
-
fooaaa,baraaa,bazaaa
|
21
|
-
|
22
|
-
# Some synonym groups specific to this example
|
23
|
-
GB,gib,gigabyte,gigabytes
|
24
|
-
MB,mib,megabyte,megabytes
|
25
|
-
Television, Televisions, TV, TVs
|
26
|
-
#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
|
27
|
-
#after us won't split it into two words.
|
28
|
-
|
29
|
-
# Synonym mappings can be used for spelling correction too
|
30
|
-
pixima => pixma
|
31
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
-
# (the "License"); you may not use this file except in compliance with
|
3
|
-
# the License. You may obtain a copy of the License at
|
4
|
-
#
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
-
#
|
7
|
-
# Unless required by applicable law or agreed to in writing, software
|
8
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
-
# See the License for the specific language governing permissions and
|
11
|
-
# limitations under the License.
|
12
|
-
|
13
|
-
#-----------------------------------------------------------------------
|
14
|
-
# Use a protected word file to protect against the stemmer reducing two
|
15
|
-
# unrelated words to the same base word.
|
16
|
-
|
17
|
-
# Some non-words that normally won't be encountered,
|
18
|
-
# just to test that they won't be stemmed.
|
19
|
-
dontstems
|
20
|
-
zwhacky
|
21
|
-
|
@@ -1,83 +0,0 @@
|
|
1
|
-
<?xml version="1.0" ?>
|
2
|
-
<!--
|
3
|
-
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
-
contributor license agreements. See the NOTICE file distributed with
|
5
|
-
this work for additional information regarding copyright ownership.
|
6
|
-
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
-
(the "License"); you may not use this file except in compliance with
|
8
|
-
the License. You may obtain a copy of the License at
|
9
|
-
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
|
12
|
-
Unless required by applicable law or agreed to in writing, software
|
13
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
See the License for the specific language governing permissions and
|
16
|
-
limitations under the License.
|
17
|
-
-->
|
18
|
-
|
19
|
-
<schema name="en" version="1.1">
|
20
|
-
<types>
|
21
|
-
<fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
|
22
|
-
<fieldType name="integer" class="solr.IntField" omitNorms="false"/>
|
23
|
-
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
|
24
|
-
<analyzer type="index">
|
25
|
-
<tokenizer class="solr.HTMLStripWhitespaceTokenizerFactory"/>
|
26
|
-
<filter class="solr.ISOLatin1AccentFilterFactory"/>
|
27
|
-
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
28
|
-
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
29
|
-
<filter class="solr.LowerCaseFilterFactory"/>
|
30
|
-
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
|
31
|
-
<filter class="solr.LengthFilterFactory" min="2" max="100" />
|
32
|
-
</analyzer>
|
33
|
-
<analyzer type="query">
|
34
|
-
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
35
|
-
<filter class="solr.ISOLatin1AccentFilterFactory"/>
|
36
|
-
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
37
|
-
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
38
|
-
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
|
39
|
-
<filter class="solr.LowerCaseFilterFactory"/>
|
40
|
-
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
|
41
|
-
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
42
|
-
</analyzer>
|
43
|
-
</fieldType>
|
44
|
-
<fieldType name="tag" class="solr.TextField" positionIncrementGap="100">
|
45
|
-
<analyzer type="index">
|
46
|
-
<tokenizer class="solr.HTMLStripWhitespaceTokenizerFactory"/>
|
47
|
-
<filter class="solr.ISOLatin1AccentFilterFactory"/>
|
48
|
-
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
49
|
-
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
50
|
-
<filter class="solr.LowerCaseFilterFactory"/>
|
51
|
-
<filter class="solr.LengthFilterFactory" min="2" max="100" />
|
52
|
-
</analyzer>
|
53
|
-
</fieldType>
|
54
|
-
</types>
|
55
|
-
|
56
|
-
<fields>
|
57
|
-
<!-- general -->
|
58
|
-
<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
|
59
|
-
|
60
|
-
<field name="pk_i" type="integer" indexed="true" stored="true"/>
|
61
|
-
<field name="pk_s" type="string" indexed="true" stored="true"/>
|
62
|
-
<field name="text" type="text" indexed="true" stored="true" termVectors="true" multiValued="true"/>
|
63
|
-
<field name="tag" type="tag" indexed="true" stored="true" termVectors="true" multiValued="true"/>
|
64
|
-
<dynamicField name="*_i" type="integer" indexed="true" stored="false"/>
|
65
|
-
<dynamicField name="*_t" type="text" indexed="true" stored="true"/>
|
66
|
-
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
|
67
|
-
<dynamicField name="*_facet" type="string" indexed="true" stored="false"/>
|
68
|
-
<dynamicField name="*_s_mv" type="string" indexed="true" stored="false" multiValued="true"/>
|
69
|
-
</fields>
|
70
|
-
|
71
|
-
<!-- field to use to determine and enforce document uniqueness. -->
|
72
|
-
<uniqueKey>id</uniqueKey>
|
73
|
-
|
74
|
-
<copyField source="*_t" dest="text"/>
|
75
|
-
<copyField source="*_facet" dest="text"/>
|
76
|
-
|
77
|
-
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
|
78
|
-
<defaultSearchField>text</defaultSearchField>
|
79
|
-
|
80
|
-
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
|
81
|
-
<solrQueryParser defaultOperator="OR"/>
|
82
|
-
</schema>
|
83
|
-
|