ruby-fedora 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +2 -9
- data/Manifest.txt +4 -18
- data/PostInstall.txt +7 -0
- data/README.rdoc +48 -0
- data/lib/fedora/base.rb +2 -1
- data/lib/fedora/datastream.rb +1 -0
- data/lib/fedora/repository.rb +6 -6
- data/lib/fedora/repository.rb.orig +248 -0
- data/lib/ruby-fedora.rb +3 -13
- data/tasks/rspec.rake +21 -0
- metadata +27 -39
- data/Rakefile +0 -9
- data/config/hoe.rb +0 -68
- data/config/requirements.rb +0 -24
- data/lib/active_fedora.rb +0 -41
- data/lib/active_fedora/base.rb +0 -292
- data/lib/active_fedora/content_model.rb +0 -22
- data/lib/active_fedora/datastream.rb +0 -95
- data/lib/active_fedora/fedora_object.rb +0 -84
- data/lib/active_fedora/metadata_datastream.rb +0 -97
- data/lib/active_fedora/model.rb +0 -94
- data/lib/active_fedora/property.rb +0 -15
- data/lib/active_fedora/qualified_dublin_core_datastream.rb +0 -72
- data/lib/active_fedora/relationship.rb +0 -43
- data/lib/active_fedora/rels_ext_datastream.rb +0 -43
- data/lib/active_fedora/semantic_node.rb +0 -221
- data/lib/active_fedora/solr_service.rb +0 -20
- data/setup.rb +0 -1585
- data/solr/config/schema.xml +0 -229
- data/test/test_helper.rb +0 -6
data/solr/config/schema.xml
DELETED
@@ -1,229 +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
|
-
<!-- This is the Solr schema file. This file should be named "schema.xml" and
|
20
|
-
should be in the conf directory under the solr home
|
21
|
-
(i.e. ./solr/conf/schema.xml by default)
|
22
|
-
or located where the classloader for the Solr webapp can find it.
|
23
|
-
|
24
|
-
For more information, on how to customize this file, please see
|
25
|
-
http://wiki.apache.org/solr/SchemaXml
|
26
|
-
-->
|
27
|
-
|
28
|
-
<schema name="active_fedora" version="0.1">
|
29
|
-
<!-- attribute "name" is the name of this schema and is only used for display purposes.
|
30
|
-
Applications should change this to reflect the nature of the search collection.
|
31
|
-
version="1.1" is Solr's version number for the schema syntax and semantics. It should
|
32
|
-
not normally be changed by applications.
|
33
|
-
1.0: multiValued attribute did not exist, all fields are multiValued by nature
|
34
|
-
1.1: multiValued attribute introduced, false by default -->
|
35
|
-
|
36
|
-
<types>
|
37
|
-
<!-- field type definitions. The "name" attribute is
|
38
|
-
just a label to be used by field definitions. The "class"
|
39
|
-
attribute and any other attributes determine the real
|
40
|
-
behavior of the fieldtype.
|
41
|
-
Class names starting with "solr" refer to java classes in the
|
42
|
-
org.apache.solr.analysis package.
|
43
|
-
-->
|
44
|
-
|
45
|
-
<!-- The StrField type is not analyzed, but indexed/stored verbatim.
|
46
|
-
- StrField and TextField support an optional compressThreshold which
|
47
|
-
limits compression (if enabled in the derived fields) to values which
|
48
|
-
exceed a certain size (in characters).
|
49
|
-
-->
|
50
|
-
<fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
|
51
|
-
|
52
|
-
<!-- boolean type: "true" or "false" -->
|
53
|
-
<fieldtype name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
|
54
|
-
|
55
|
-
<!-- The optional sortMissingLast and sortMissingFirst attributes are
|
56
|
-
currently supported on types that are sorted internally as strings.
|
57
|
-
- If sortMissingLast="true", then a sort on this field will cause documents
|
58
|
-
without the field to come after documents with the field,
|
59
|
-
regardless of the requested sort order (asc or desc).
|
60
|
-
- If sortMissingFirst="true", then a sort on this field will cause documents
|
61
|
-
without the field to come before documents with the field,
|
62
|
-
regardless of the requested sort order.
|
63
|
-
- If sortMissingLast="false" and sortMissingFirst="false" (the default),
|
64
|
-
then default lucene sorting will be used which places docs without the
|
65
|
-
field first in an ascending sort and last in a descending sort.
|
66
|
-
-->
|
67
|
-
|
68
|
-
|
69
|
-
<!-- numeric field types that store and index the text
|
70
|
-
value verbatim (and hence don't support range queries, since the
|
71
|
-
lexicographic ordering isn't equal to the numeric ordering) -->
|
72
|
-
<fieldtype name="integer" class="solr.IntField" omitNorms="true"/>
|
73
|
-
<fieldtype name="long" class="solr.LongField" omitNorms="true"/>
|
74
|
-
<fieldtype name="float" class="solr.FloatField" omitNorms="true"/>
|
75
|
-
<fieldtype name="double" class="solr.DoubleField" omitNorms="true"/>
|
76
|
-
|
77
|
-
|
78
|
-
<!-- Numeric field types that manipulate the value into
|
79
|
-
a string value that isn't human-readable in its internal form,
|
80
|
-
but with a lexicographic ordering the same as the numeric ordering,
|
81
|
-
so that range queries work correctly. -->
|
82
|
-
<fieldtype name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
|
83
|
-
<fieldtype name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
|
84
|
-
<fieldtype name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
|
85
|
-
<fieldtype name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
|
86
|
-
|
87
|
-
|
88
|
-
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
|
89
|
-
is a more restricted form of the canonical representation of dateTime
|
90
|
-
http://www.w3.org/TR/xmlschema-2/#dateTime
|
91
|
-
The trailing "Z" designates UTC time and is mandatory.
|
92
|
-
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
93
|
-
All other components are mandatory.
|
94
|
-
|
95
|
-
Expressions can also be used to denote calculations that should be
|
96
|
-
performed relative to "NOW" to determine the value, ie...
|
97
|
-
|
98
|
-
NOW/HOUR
|
99
|
-
... Round to the start of the current hour
|
100
|
-
NOW-1DAY
|
101
|
-
... Exactly 1 day prior to now
|
102
|
-
NOW/DAY+6MONTHS+3DAYS
|
103
|
-
... 6 months and 3 days in the future from the start of
|
104
|
-
the current day
|
105
|
-
|
106
|
-
Consult the DateField javadocs for more information.
|
107
|
-
-->
|
108
|
-
<fieldtype name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
|
109
|
-
|
110
|
-
<!-- solr.TextField allows the specification of custom text analyzers
|
111
|
-
specified as a tokenizer and a list of token filters. Different
|
112
|
-
analyzers may be specified for indexing and querying.
|
113
|
-
|
114
|
-
The optional positionIncrementGap puts space between multiple fields of
|
115
|
-
this type on the same document, with the purpose of preventing false phrase
|
116
|
-
matching across fields.
|
117
|
-
|
118
|
-
For more info on customizing your analyzer chain, please see
|
119
|
-
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
|
120
|
-
-->
|
121
|
-
|
122
|
-
<!-- One can also specify an existing Analyzer class that has a
|
123
|
-
default constructor via the class attribute on the analyzer element
|
124
|
-
<fieldtype name="text_greek" class="solr.TextField">
|
125
|
-
<analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
|
126
|
-
</fieldType>
|
127
|
-
-->
|
128
|
-
|
129
|
-
<!-- A text field that only splits on whitespace for exact matching of words -->
|
130
|
-
<fieldtype name="text_ws" class="solr.TextField" positionIncrementGap="100">
|
131
|
-
<analyzer>
|
132
|
-
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
133
|
-
</analyzer>
|
134
|
-
</fieldtype>
|
135
|
-
|
136
|
-
<fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
|
137
|
-
<analyzer>
|
138
|
-
<tokenizer class="solr.StandardTokenizerFactory"/>
|
139
|
-
<filter class="solr.StandardFilterFactory"/>
|
140
|
-
<filter class="solr.LowerCaseFilterFactory"/>
|
141
|
-
</analyzer>
|
142
|
-
</fieldtype>
|
143
|
-
|
144
|
-
<fieldtype name="text_zh" class="solr.TextField">
|
145
|
-
<analyzer class="org.apache.lucene.analysis.cn.ChineseAnalyzer"/>
|
146
|
-
</fieldtype>
|
147
|
-
|
148
|
-
|
149
|
-
<!-- Less flexible matching, but less false matches. Probably not ideal for product names,
|
150
|
-
but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
|
151
|
-
<fieldtype name="textTight" class="solr.TextField" positionIncrementGap="100" >
|
152
|
-
<analyzer>
|
153
|
-
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
154
|
-
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
|
155
|
-
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
156
|
-
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
157
|
-
<filter class="solr.LowerCaseFilterFactory"/>
|
158
|
-
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
|
159
|
-
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
160
|
-
</analyzer>
|
161
|
-
</fieldtype>
|
162
|
-
|
163
|
-
</types>
|
164
|
-
|
165
|
-
|
166
|
-
<fields>
|
167
|
-
<!-- Valid attributes for fields:
|
168
|
-
name: mandatory - the name for the field
|
169
|
-
type: mandatory - the name of a previously defined type from the <types> section
|
170
|
-
indexed: true if this field should be indexed (searchable or sortable)
|
171
|
-
stored: true if this field should be retrievable
|
172
|
-
compressed: [false] if this field should be stored using gzip compression
|
173
|
-
(this will only apply if the field type is compressable; among
|
174
|
-
the standard field types, only TextField and StrField are)
|
175
|
-
multiValued: true if this field may contain multiple values per document
|
176
|
-
omitNorms: (expert) set to true to omit the norms associated with
|
177
|
-
this field (this disables length normalization and index-time
|
178
|
-
boosting for the field, and saves some memory). Only full-text
|
179
|
-
fields or fields that need an index-time boost need norms.
|
180
|
-
-->
|
181
|
-
|
182
|
-
<field name="id" type="string" indexed="true" stored="true"/>
|
183
|
-
|
184
|
-
<!-- catchall field, containing all other searchable text fields (implemented
|
185
|
-
via copyField further on in this schema -->
|
186
|
-
<field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
|
187
|
-
<!-- catchall field, containing all other searchable text fields (implemented
|
188
|
-
via copyField further on in this schema -->
|
189
|
-
<field name="date" type="date" indexed="true" stored="false" multiValued="true"/>
|
190
|
-
|
191
|
-
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
|
192
|
-
will be used if the name matches any of the patterns.
|
193
|
-
RESTRICTION: the glob-like pattern in the name attribute must have
|
194
|
-
a "*" only at the start or the end.
|
195
|
-
EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
|
196
|
-
Longer patterns will be matched first. if equal size patterns
|
197
|
-
both match, the first appearing in the schema will be used. -->
|
198
|
-
<dynamicField name="*_date" type="date" indexed="true" stored="true" multiValued="true"/>
|
199
|
-
<dynamicField name="*_name" type="date" indexed="true" stored="true" multiValued="true"/>
|
200
|
-
<dynamicField name="*_field" type="text" indexed="true" stored="true" multiValued="true"/>
|
201
|
-
|
202
|
-
<dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true"/>
|
203
|
-
<dynamicField name="*_zh_text" type="text_zh" indexed="true" stored="true" multiValued="true"/>
|
204
|
-
<dynamicField name="*_text" type="text" indexed="true" stored="true" multiValued="true"/>
|
205
|
-
<dynamicField name="*_display" type="text" indexed="false" stored="true" multiValued="true"/>
|
206
|
-
</fields>
|
207
|
-
|
208
|
-
<!-- field to use to determine and enforce document uniqueness. -->
|
209
|
-
<uniqueKey>id</uniqueKey>
|
210
|
-
|
211
|
-
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
|
212
|
-
<defaultSearchField>text</defaultSearchField>
|
213
|
-
|
214
|
-
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
|
215
|
-
<solrQueryParser defaultOperator="AND"/>
|
216
|
-
|
217
|
-
<!-- copyField commands copy one field to another at the time a document
|
218
|
-
is added to the index. It's used either to index the same field differently,
|
219
|
-
or to add multiple fields to the same field for easier/faster searching. -->
|
220
|
-
<copyField source="*_date" dest="date"/>
|
221
|
-
<copyField source="*_text" dest="text"/>
|
222
|
-
<copyField source="*_facet" dest="text"/>
|
223
|
-
|
224
|
-
<!-- Similarity is the scoring routine for each document vs. a query.
|
225
|
-
A custom similarity may be specified here, but the default is fine
|
226
|
-
for most applications. -->
|
227
|
-
<!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
|
228
|
-
|
229
|
-
</schema>
|