Commit cdd7e562f3050aa6ebfb27d5bae9a964d5b00381
1 parent
83436233
Exists in
master
and in
90 other branches
start over
Showing
16 changed files
with
45 additions
and
1706 deletions
Show diff stats
.gitignore
.mrconfig
... | ... | @@ -1,25 +0,0 @@ |
1 | -[.] | |
2 | - | |
3 | -[colab] | |
4 | -checkout = git clone git@beta.softwarepublico.gov.br:softwarepublico/colab.git | |
5 | - | |
6 | -[colab-deps] | |
7 | -checkout = git clone git@beta.softwarepublico.gov.br:softwarepublico/colab-deps.git | |
8 | - | |
9 | -[mailman-api] | |
10 | -checkout = git clone https://github.com/TracyWebTech/mailman-api.git | |
11 | - | |
12 | -[mailman-api/simplejson] | |
13 | -checkout = git clone https://github.com/simplejson/simplejson.git | |
14 | - | |
15 | -[mailman-api/bottle] | |
16 | -checkout = git clone https://github.com/defnull/bottle.git | |
17 | - | |
18 | -[mailman-api/paste] | |
19 | -checkout = hg clone http://bitbucket.org/ianb/paste | |
20 | - | |
21 | -[mailman-api/paste/six] | |
22 | -checkout = hg clone https://bitbucket.org/gutworth/six | |
23 | - | |
24 | -[omniauth-remote-user] | |
25 | -checkout = git clone git@beta.softwarepublico.gov.br:softwarepublico/omniauth-remote-user.git |
Makefile
... | ... | @@ -1,18 +0,0 @@ |
1 | -PROJECT = softwarepublico | |
2 | -VERSION = $(shell git describe --tags || date +%Y.%d) | |
3 | - | |
4 | -TARBALL = dist/$(PROJECT)-$(VERSION).tar.gz | |
5 | - | |
6 | -all: | |
7 | - | |
8 | -sdist: $(TARBALL) | |
9 | - | |
10 | -$(TARBALL): $(shell git ls-files) | |
11 | - @if [ -n "$$(git diff-index HEAD)" ]; then echo "Cannot proceed with uncommitted changes"; false; fi | |
12 | - mkdir -p $$(dirname $@) | |
13 | - (git archive --prefix=$(PROJECT)-$(VERSION)/ HEAD | gzip -) > $@ | |
14 | - | |
15 | -clean: | |
16 | - | |
17 | -distclean: clean | |
18 | - $(RM) -r dist |
README.md
... | ... | @@ -1,24 +0,0 @@ |
1 | -# Quick start | |
2 | - | |
3 | -To clone all the sub-projects: | |
4 | - | |
5 | -``` | |
6 | -$ install `mr` (`apt-get install mr`) | |
7 | -$ echo $(pwd)/.mrconfig >> ~/.mrtrust | |
8 | -$ mr checkout | |
9 | -``` | |
10 | - | |
11 | -To build packages: | |
12 | - | |
13 | -``` | |
14 | -$ make | |
15 | -``` | |
16 | - | |
17 | -To add a new subproject: | |
18 | - | |
19 | -- edit `.mrconfig` and add a new section for the project (base it on the | |
20 | - existing sections for the existing subprojects) | |
21 | -- add a new .spec.in file for the project in rpm/$PROJECT.spec.in | |
22 | -- edit `Makefile` and add the subproject name to the COMPONENTS variable right | |
23 | - at the beginning of the file. | |
24 | -- that's all |
Vagrantfile
... | ... | @@ -9,10 +9,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
9 | 9 | |
10 | 10 | proxy = ENV['http_proxy'] || ENV['HTTP_PROXY'] |
11 | 11 | if proxy |
12 | - config.vm.provision 'shell', path: 'proxy.sh', args: [proxy] | |
12 | + config.vm.provision 'shell', path: 'utils/proxy.sh', args: [proxy] | |
13 | 13 | end |
14 | 14 | |
15 | - config.vm.provision 'shell', path: 'vagrant/provision.sh' | |
16 | - | |
17 | - config.vm.network :forwarded_port, guest: 8000, host: 8000 # Colab (runserver) | |
15 | + config.vm.network :forwarded_port, guest: 443, host: 8443 | |
18 | 16 | end | ... | ... |
mrconfig
obs/checkout
proxy.sh
... | ... | @@ -1,38 +0,0 @@ |
1 | -#!/bin/sh | |
2 | - | |
3 | -set -e | |
4 | - | |
5 | -if [ -n "$1" ]; then | |
6 | - http_proxy="$1" | |
7 | -fi | |
8 | - | |
9 | -if [ -z "$http_proxy" ]; then | |
10 | - echo "No http_proxy in command line or environment!" | |
11 | - echo | |
12 | - echo "usage: $0 [HTTP_PROXY]" | |
13 | - exit 1 | |
14 | -fi | |
15 | - | |
16 | -cat > /etc/profile.d/http_proxy.sh<<EOF | |
17 | -export http_proxy='$http_proxy' | |
18 | -export https_proxy='$http_proxy' | |
19 | -export HTTP_PROXY='$http_proxy' | |
20 | -EOF | |
21 | - | |
22 | -if test -f /etc/yum.conf; then | |
23 | - sed -i -e '/proxy=/d; /http_caching=/ d' /etc/yum.conf | |
24 | - sed -i -s '/\[main\]/ a http_caching=packages' /etc/yum.conf | |
25 | - sed -i -s '/\[main\]/ a proxy='$http_proxy /etc/yum.conf | |
26 | - | |
27 | - rm -f /etc/yum/pluginconf.d/fastestmirror.conf | |
28 | - | |
29 | - repofiles=$(grep -rl '^#baseurl' /etc/yum.repos.d) | |
30 | - if [ -n "$repofiles" ]; then | |
31 | - sed -i -e 's/^#baseurl/baseurl/; s/^mirrorlist=/#mirrorlist-/' $repofiles | |
32 | - fi | |
33 | - | |
34 | - if [ ! -f /var/tmp/yum-clean.stamp ]; then | |
35 | - pgrep -f yum || yum clean all || true | |
36 | - touch /var/tmp/yum-clean.stamp | |
37 | - fi | |
38 | -fi |
rpm/README.md
... | ... | @@ -1 +0,0 @@ |
1 | -This directory contains RPM spec files used for components of the project. |
rpm/solr-4.6.1.patch
... | ... | @@ -1,1364 +0,0 @@ |
1 | -diff -uNr solr-4.6.1-orig/example/solr/collection1/conf/schema.xml solr-4.6.1/example/solr/collection1/conf/schema.xml | |
2 | ---- solr-4.6.1-orig/example/solr/collection1/conf/schema.xml 2013-11-18 04:02:57.000000000 +0000 | |
3 | -+++ solr-4.6.1/example/solr/collection1/conf/schema.xml 2014-10-28 12:10:09.494399483 +0000 | |
4 | -@@ -1,4 +1,4 @@ | |
5 | --<?xml version="1.0" encoding="UTF-8" ?> | |
6 | -+<?xml version="1.0" ?> | |
7 | - <!-- | |
8 | - Licensed to the Apache Software Foundation (ASF) under one or more | |
9 | - contributor license agreements. See the NOTICE file distributed with | |
10 | -@@ -16,447 +16,38 @@ | |
11 | - limitations under the License. | |
12 | - --> | |
13 | - | |
14 | --<!-- | |
15 | -- This is the Solr schema file. This file should be named "schema.xml" and | |
16 | -- should be in the conf directory under the solr home | |
17 | -- (i.e. ./solr/conf/schema.xml by default) | |
18 | -- or located where the classloader for the Solr webapp can find it. | |
19 | -- | |
20 | -- This example schema is the recommended starting point for users. | |
21 | -- It should be kept correct and concise, usable out-of-the-box. | |
22 | -- | |
23 | -- For more information, on how to customize this file, please see | |
24 | -- http://wiki.apache.org/solr/SchemaXml | |
25 | -- | |
26 | -- PERFORMANCE NOTE: this schema includes many optional features and should not | |
27 | -- be used for benchmarking. To improve performance one could | |
28 | -- - set stored="false" for all fields possible (esp large fields) when you | |
29 | -- only need to search on the field but don't need to return the original | |
30 | -- value. | |
31 | -- - set indexed="false" if you don't need to search on the field, but only | |
32 | -- return the field as a result of searching on other indexed fields. | |
33 | -- - remove all unneeded copyField statements | |
34 | -- - for best index size and searching performance, set "index" to false | |
35 | -- for all general text fields, use copyField to copy them to the | |
36 | -- catchall "text" field, and use that for searching. | |
37 | -- - For maximum indexing performance, use the StreamingUpdateSolrServer | |
38 | -- java client. | |
39 | -- - Remember to run the JVM in server mode, and use a higher logging level | |
40 | -- that avoids logging every request | |
41 | ----> | |
42 | -- | |
43 | --<schema name="example" version="1.5"> | |
44 | -- <!-- attribute "name" is the name of this schema and is only used for display purposes. | |
45 | -- version="x.y" is Solr's version number for the schema syntax and | |
46 | -- semantics. It should not normally be changed by applications. | |
47 | -- | |
48 | -- 1.0: multiValued attribute did not exist, all fields are multiValued | |
49 | -- by nature | |
50 | -- 1.1: multiValued attribute introduced, false by default | |
51 | -- 1.2: omitTermFreqAndPositions attribute introduced, true by default | |
52 | -- except for text fields. | |
53 | -- 1.3: removed optional field compress feature | |
54 | -- 1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser | |
55 | -- behavior when a single string produces multiple tokens. Defaults | |
56 | -- to off for version >= 1.4 | |
57 | -- 1.5: omitNorms defaults to true for primitive field types | |
58 | -- (int, float, boolean, string...) | |
59 | -- --> | |
60 | -- | |
61 | -- <fields> | |
62 | -- <!-- Valid attributes for fields: | |
63 | -- name: mandatory - the name for the field | |
64 | -- type: mandatory - the name of a field type from the | |
65 | -- <types> fieldType section | |
66 | -- indexed: true if this field should be indexed (searchable or sortable) | |
67 | -- stored: true if this field should be retrievable | |
68 | -- docValues: true if this field should have doc values. Doc values are | |
69 | -- useful for faceting, grouping, sorting and function queries. Although not | |
70 | -- required, doc values will make the index faster to load, more | |
71 | -- NRT-friendly and more memory-efficient. They however come with some | |
72 | -- limitations: they are currently only supported by StrField, UUIDField | |
73 | -- and all Trie*Fields, and depending on the field type, they might | |
74 | -- require the field to be single-valued, be required or have a default | |
75 | -- value (check the documentation of the field type you're interested in | |
76 | -- for more information) | |
77 | -- multiValued: true if this field may contain multiple values per document | |
78 | -- omitNorms: (expert) set to true to omit the norms associated with | |
79 | -- this field (this disables length normalization and index-time | |
80 | -- boosting for the field, and saves some memory). Only full-text | |
81 | -- fields or fields that need an index-time boost need norms. | |
82 | -- Norms are omitted for primitive (non-analyzed) types by default. | |
83 | -- termVectors: [false] set to true to store the term vector for a | |
84 | -- given field. | |
85 | -- When using MoreLikeThis, fields used for similarity should be | |
86 | -- stored for best performance. | |
87 | -- termPositions: Store position information with the term vector. | |
88 | -- This will increase storage costs. | |
89 | -- termOffsets: Store offset information with the term vector. This | |
90 | -- will increase storage costs. | |
91 | -- required: The field is required. It will throw an error if the | |
92 | -- value does not exist | |
93 | -- default: a value that should be used if no value is specified | |
94 | -- when adding a document. | |
95 | -- --> | |
96 | -- | |
97 | -- <!-- field names should consist of alphanumeric or underscore characters only and | |
98 | -- not start with a digit. This is not currently strictly enforced, | |
99 | -- but other field names will not have first class support from all components | |
100 | -- and back compatibility is not guaranteed. Names with both leading and | |
101 | -- trailing underscores (e.g. _version_) are reserved. | |
102 | -- --> | |
103 | -- | |
104 | -- <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml | |
105 | -- or Solr won't start. _version_ and update log are required for SolrCloud | |
106 | -- --> | |
107 | -- <field name="_version_" type="long" indexed="true" stored="true"/> | |
108 | -- | |
109 | -- <!-- points to the root document of a block of nested documents. Required for nested | |
110 | -- document support, may be removed otherwise | |
111 | -- --> | |
112 | -- <field name="_root_" type="string" indexed="true" stored="false"/> | |
113 | -- | |
114 | -- <!-- Only remove the "id" field if you have a very good reason to. While not strictly | |
115 | -- required, it is highly recommended. A <uniqueKey> is present in almost all Solr | |
116 | -- installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id". | |
117 | -- --> | |
118 | -- <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> | |
119 | -- | |
120 | -- <field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/> | |
121 | -- <field name="name" type="text_general" indexed="true" stored="true"/> | |
122 | -- <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/> | |
123 | -- <field name="cat" type="string" indexed="true" stored="true" multiValued="true"/> | |
124 | -- <field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/> | |
125 | -- <field name="includes" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" /> | |
126 | -- | |
127 | -- <field name="weight" type="float" indexed="true" stored="true"/> | |
128 | -- <field name="price" type="float" indexed="true" stored="true"/> | |
129 | -- <field name="popularity" type="int" indexed="true" stored="true" /> | |
130 | -- <field name="inStock" type="boolean" indexed="true" stored="true" /> | |
131 | -- | |
132 | -- <field name="store" type="location" indexed="true" stored="true"/> | |
133 | -- | |
134 | -- <!-- Common metadata fields, named specifically to match up with | |
135 | -- SolrCell metadata when parsing rich documents such as Word, PDF. | |
136 | -- Some fields are multiValued only because Tika currently may return | |
137 | -- multiple values for them. Some metadata is parsed from the documents, | |
138 | -- but there are some which come from the client context: | |
139 | -- "content_type": From the HTTP headers of incoming stream | |
140 | -- "resourcename": From SolrCell request param resource.name | |
141 | -- --> | |
142 | -- <field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/> | |
143 | -- <field name="subject" type="text_general" indexed="true" stored="true"/> | |
144 | -- <field name="description" type="text_general" indexed="true" stored="true"/> | |
145 | -- <field name="comments" type="text_general" indexed="true" stored="true"/> | |
146 | -- <field name="author" type="text_general" indexed="true" stored="true"/> | |
147 | -- <field name="keywords" type="text_general" indexed="true" stored="true"/> | |
148 | -- <field name="category" type="text_general" indexed="true" stored="true"/> | |
149 | -- <field name="resourcename" type="text_general" indexed="true" stored="true"/> | |
150 | -- <field name="url" type="text_general" indexed="true" stored="true"/> | |
151 | -- <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/> | |
152 | -- <field name="last_modified" type="date" indexed="true" stored="true"/> | |
153 | -- <field name="links" type="string" indexed="true" stored="true" multiValued="true"/> | |
154 | -- | |
155 | -- <!-- Main body of document extracted by SolrCell. | |
156 | -- NOTE: This field is not indexed by default, since it is also copied to "text" | |
157 | -- using copyField below. This is to save space. Use this field for returning and | |
158 | -- highlighting document content. Use the "text" field to search the content. --> | |
159 | -- <field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/> | |
160 | -- | |
161 | -- | |
162 | -- <!-- catchall field, containing all other searchable text fields (implemented | |
163 | -- via copyField further on in this schema --> | |
164 | -- <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/> | |
165 | -- | |
166 | -- <!-- catchall text field that indexes tokens both normally and in reverse for efficient | |
167 | -- leading wildcard queries. --> | |
168 | -- <field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/> | |
169 | -- | |
170 | -- <!-- non-tokenized version of manufacturer to make it easier to sort or group | |
171 | -- results by manufacturer. copied from "manu" via copyField --> | |
172 | -- <field name="manu_exact" type="string" indexed="true" stored="false"/> | |
173 | -- | |
174 | -- <field name="payloads" type="payloads" indexed="true" stored="true"/> | |
175 | -- | |
176 | -- | |
177 | -- <!-- | |
178 | -- Some fields such as popularity and manu_exact could be modified to | |
179 | -- leverage doc values: | |
180 | -- <field name="popularity" type="int" indexed="true" stored="true" docValues="true" /> | |
181 | -- <field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" /> | |
182 | -- <field name="cat" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/> | |
183 | -- | |
184 | -- | |
185 | -- Although it would make indexing slightly slower and the index bigger, it | |
186 | -- would also make the index faster to load, more memory-efficient and more | |
187 | -- NRT-friendly. | |
188 | -- --> | |
189 | -- | |
190 | -- <!-- Dynamic field definitions allow using convention over configuration | |
191 | -- for fields via the specification of patterns to match field names. | |
192 | -- EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i) | |
193 | -- RESTRICTION: the glob-like pattern in the name attribute must have | |
194 | -- a "*" only at the start or the end. --> | |
195 | -- | |
196 | -- <dynamicField name="*_i" type="int" indexed="true" stored="true"/> | |
197 | -- <dynamicField name="*_is" type="int" indexed="true" stored="true" multiValued="true"/> | |
198 | -- <dynamicField name="*_s" type="string" indexed="true" stored="true" /> | |
199 | -- <dynamicField name="*_ss" type="string" indexed="true" stored="true" multiValued="true"/> | |
200 | -- <dynamicField name="*_l" type="long" indexed="true" stored="true"/> | |
201 | -- <dynamicField name="*_ls" type="long" indexed="true" stored="true" multiValued="true"/> | |
202 | -- <dynamicField name="*_t" type="text_general" indexed="true" stored="true"/> | |
203 | -- <dynamicField name="*_txt" type="text_general" indexed="true" stored="true" multiValued="true"/> | |
204 | -- <dynamicField name="*_en" type="text_en" indexed="true" stored="true" multiValued="true"/> | |
205 | -- <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/> | |
206 | -- <dynamicField name="*_bs" type="boolean" indexed="true" stored="true" multiValued="true"/> | |
207 | -- <dynamicField name="*_f" type="float" indexed="true" stored="true"/> | |
208 | -- <dynamicField name="*_fs" type="float" indexed="true" stored="true" multiValued="true"/> | |
209 | -- <dynamicField name="*_d" type="double" indexed="true" stored="true"/> | |
210 | -- <dynamicField name="*_ds" type="double" indexed="true" stored="true" multiValued="true"/> | |
211 | -- | |
212 | -- <!-- Type used to index the lat and lon components for the "location" FieldType --> | |
213 | -- <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" /> | |
214 | -- | |
215 | -- <dynamicField name="*_dt" type="date" indexed="true" stored="true"/> | |
216 | -- <dynamicField name="*_dts" type="date" indexed="true" stored="true" multiValued="true"/> | |
217 | -- <dynamicField name="*_p" type="location" indexed="true" stored="true"/> | |
218 | -- | |
219 | -- <!-- some trie-coded dynamic fields for faster range queries --> | |
220 | -- <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/> | |
221 | -- <dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/> | |
222 | -- <dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/> | |
223 | -- <dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/> | |
224 | -- <dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/> | |
225 | -- | |
226 | -- <dynamicField name="*_pi" type="pint" indexed="true" stored="true"/> | |
227 | -- <dynamicField name="*_c" type="currency" indexed="true" stored="true"/> | |
228 | -- | |
229 | -- <dynamicField name="ignored_*" type="ignored" multiValued="true"/> | |
230 | -- <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/> | |
231 | -- | |
232 | -- <dynamicField name="random_*" type="random" /> | |
233 | -- | |
234 | -- <!-- uncomment the following to ignore any fields that don't already match an existing | |
235 | -- field name or dynamic field, rather than reporting them as an error. | |
236 | -- alternately, change the type="ignored" to some other type e.g. "text" if you want | |
237 | -- unknown fields indexed and/or stored by default --> | |
238 | -- <!--dynamicField name="*" type="ignored" multiValued="true" /--> | |
239 | -- | |
240 | -- </fields> | |
241 | -- | |
242 | -- | |
243 | -- <!-- Field to use to determine and enforce document uniqueness. | |
244 | -- Unless this field is marked with required="false", it will be a required field | |
245 | -- --> | |
246 | -- <uniqueKey>id</uniqueKey> | |
247 | -- | |
248 | -- <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when | |
249 | -- parsing a query string that isn't explicit about the field. Machine (non-user) | |
250 | -- generated queries are best made explicit, or they can use the "df" request parameter | |
251 | -- which takes precedence over this. | |
252 | -- Note: Un-commenting defaultSearchField will be insufficient if your request handler | |
253 | -- in solrconfig.xml defines "df", which takes precedence. That would need to be removed. | |
254 | -- <defaultSearchField>text</defaultSearchField> --> | |
255 | -- | |
256 | -- <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers | |
257 | -- when parsing a query string to determine if a clause of the query should be marked as | |
258 | -- required or optional, assuming the clause isn't already marked by some operator. | |
259 | -- The default is OR, which is generally assumed so it is not a good idea to change it | |
260 | -- globally here. The "q.op" request parameter takes precedence over this. | |
261 | -- <solrQueryParser defaultOperator="OR"/> --> | |
262 | -- | |
263 | -- <!-- copyField commands copy one field to another at the time a document | |
264 | -- is added to the index. It's used either to index the same field differently, | |
265 | -- or to add multiple fields to the same field for easier/faster searching. --> | |
266 | -- | |
267 | -- <copyField source="cat" dest="text"/> | |
268 | -- <copyField source="name" dest="text"/> | |
269 | -- <copyField source="manu" dest="text"/> | |
270 | -- <copyField source="features" dest="text"/> | |
271 | -- <copyField source="includes" dest="text"/> | |
272 | -- <copyField source="manu" dest="manu_exact"/> | |
273 | -- | |
274 | -- <!-- Copy the price into a currency enabled field (default USD) --> | |
275 | -- <copyField source="price" dest="price_c"/> | |
276 | -- | |
277 | -- <!-- Text fields from SolrCell to search by default in our catch-all field --> | |
278 | -- <copyField source="title" dest="text"/> | |
279 | -- <copyField source="author" dest="text"/> | |
280 | -- <copyField source="description" dest="text"/> | |
281 | -- <copyField source="keywords" dest="text"/> | |
282 | -- <copyField source="content" dest="text"/> | |
283 | -- <copyField source="content_type" dest="text"/> | |
284 | -- <copyField source="resourcename" dest="text"/> | |
285 | -- <copyField source="url" dest="text"/> | |
286 | -- | |
287 | -- <!-- Create a string version of author for faceting --> | |
288 | -- <copyField source="author" dest="author_s"/> | |
289 | -- | |
290 | -- <!-- Above, multiple source fields are copied to the [text] field. | |
291 | -- Another way to map multiple source fields to the same | |
292 | -- destination field is to use the dynamic field syntax. | |
293 | -- copyField also supports a maxChars to copy setting. --> | |
294 | -- | |
295 | -- <!-- <copyField source="*_t" dest="text" maxChars="3000"/> --> | |
296 | -- | |
297 | -- <!-- copy name to alphaNameSort, a field designed for sorting by name --> | |
298 | -- <!-- <copyField source="name" dest="alphaNameSort"/> --> | |
299 | -- | |
300 | -+<schema name="default" version="1.4"> | |
301 | - <types> | |
302 | -- <!-- field type definitions. The "name" attribute is | |
303 | -- just a label to be used by field definitions. The "class" | |
304 | -- attribute and any other attributes determine the real | |
305 | -- behavior of the fieldType. | |
306 | -- Class names starting with "solr" refer to java classes in a | |
307 | -- standard package such as org.apache.solr.analysis | |
308 | -- --> | |
309 | -- | |
310 | -- <!-- The StrField type is not analyzed, but indexed/stored verbatim. | |
311 | -- It supports doc values but in that case the field needs to be | |
312 | -- single-valued and either required or have a default value. | |
313 | -- --> | |
314 | -- <fieldType name="string" class="solr.StrField" sortMissingLast="true" /> | |
315 | -- | |
316 | -- <!-- boolean type: "true" or "false" --> | |
317 | -- <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/> | |
318 | -- | |
319 | -- <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are | |
320 | -- currently supported on types that are sorted internally as strings | |
321 | -- and on numeric types. | |
322 | -- This includes "string","boolean", and, as of 3.5 (and 4.x), | |
323 | -- int, float, long, date, double, including the "Trie" variants. | |
324 | -- - If sortMissingLast="true", then a sort on this field will cause documents | |
325 | -- without the field to come after documents with the field, | |
326 | -- regardless of the requested sort order (asc or desc). | |
327 | -- - If sortMissingFirst="true", then a sort on this field will cause documents | |
328 | -- without the field to come before documents with the field, | |
329 | -- regardless of the requested sort order. | |
330 | -- - If sortMissingLast="false" and sortMissingFirst="false" (the default), | |
331 | -- then default lucene sorting will be used which places docs without the | |
332 | -- field first in an ascending sort and last in a descending sort. | |
333 | -- --> | |
334 | -- | |
335 | -- <!-- | |
336 | -- Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types. | |
337 | -- | |
338 | -- These fields support doc values, but they require the field to be | |
339 | -- single-valued and either be required or have a default value. | |
340 | -- --> | |
341 | -- <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/> | |
342 | -- <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/> | |
343 | -- <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/> | |
344 | -- <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/> | |
345 | -- | |
346 | -- <!-- | |
347 | -- Numeric field types that index each value at various levels of precision | |
348 | -- to accelerate range queries when the number of values between the range | |
349 | -- endpoints is large. See the javadoc for NumericRangeQuery for internal | |
350 | -- implementation details. | |
351 | -- | |
352 | -- Smaller precisionStep values (specified in bits) will lead to more tokens | |
353 | -- indexed per value, slightly larger index size, and faster range queries. | |
354 | -- A precisionStep of 0 disables indexing at different precision levels. | |
355 | -- --> | |
356 | -- <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/> | |
357 | -- <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/> | |
358 | -- <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/> | |
359 | -- <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/> | |
360 | -- | |
361 | -- <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and | |
362 | -- is a more restricted form of the canonical representation of dateTime | |
363 | -- http://www.w3.org/TR/xmlschema-2/#dateTime | |
364 | -- The trailing "Z" designates UTC time and is mandatory. | |
365 | -- Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z | |
366 | -- All other components are mandatory. | |
367 | -- | |
368 | -- Expressions can also be used to denote calculations that should be | |
369 | -- performed relative to "NOW" to determine the value, ie... | |
370 | -- | |
371 | -- NOW/HOUR | |
372 | -- ... Round to the start of the current hour | |
373 | -- NOW-1DAY | |
374 | -- ... Exactly 1 day prior to now | |
375 | -- NOW/DAY+6MONTHS+3DAYS | |
376 | -- ... 6 months and 3 days in the future from the start of | |
377 | -- the current day | |
378 | -- | |
379 | -- Consult the DateField javadocs for more information. | |
380 | -- | |
381 | -- Note: For faster range queries, consider the tdate type | |
382 | -- --> | |
383 | -- <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/> | |
384 | -- | |
385 | -- <!-- A Trie based date field for faster date range queries and date faceting. --> | |
386 | -- <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/> | |
387 | -- | |
388 | -- | |
389 | -- <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings --> | |
390 | -+ <fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> | |
391 | -+ <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/> | |
392 | - <fieldtype name="binary" class="solr.BinaryField"/> | |
393 | - | |
394 | -- <!-- | |
395 | -- Note: | |
396 | -- These should only be used for compatibility with existing indexes (created with lucene or older Solr versions). | |
397 | -- Use Trie based fields instead. As of Solr 3.5 and 4.x, Trie based fields support sortMissingFirst/Last | |
398 | -- | |
399 | -- Plain numeric field types that store and index the text | |
400 | -- value verbatim (and hence don't correctly support range queries, since the | |
401 | -- lexicographic ordering isn't equal to the numeric ordering) | |
402 | -- --> | |
403 | -- <fieldType name="pint" class="solr.IntField"/> | |
404 | -- <fieldType name="plong" class="solr.LongField"/> | |
405 | -- <fieldType name="pfloat" class="solr.FloatField"/> | |
406 | -- <fieldType name="pdouble" class="solr.DoubleField"/> | |
407 | -- <fieldType name="pdate" class="solr.DateField" sortMissingLast="true"/> | |
408 | -- | |
409 | -- <!-- The "RandomSortField" is not used to store or search any | |
410 | -- data. You can declare fields of this type it in your schema | |
411 | -- to generate pseudo-random orderings of your docs for sorting | |
412 | -- or function purposes. The ordering is generated based on the field | |
413 | -- name and the version of the index. As long as the index version | |
414 | -- remains unchanged, and the same field name is reused, | |
415 | -- the ordering of the docs will be consistent. | |
416 | -- If you want different psuedo-random orderings of documents, | |
417 | -- for the same version of the index, use a dynamicField and | |
418 | -- change the field name in the request. | |
419 | -- --> | |
420 | -- <fieldType name="random" class="solr.RandomSortField" indexed="true" /> | |
421 | -- | |
422 | -- <!-- solr.TextField allows the specification of custom text analyzers | |
423 | -- specified as a tokenizer and a list of token filters. Different | |
424 | -- analyzers may be specified for indexing and querying. | |
425 | -- | |
426 | -- The optional positionIncrementGap puts space between multiple fields of | |
427 | -- this type on the same document, with the purpose of preventing false phrase | |
428 | -- matching across fields. | |
429 | -- | |
430 | -- For more info on customizing your analyzer chain, please see | |
431 | -- http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters | |
432 | -- --> | |
433 | -- | |
434 | -- <!-- One can also specify an existing Analyzer class that has a | |
435 | -- default constructor via the class attribute on the analyzer element. | |
436 | -- Example: | |
437 | -- <fieldType name="text_greek" class="solr.TextField"> | |
438 | -- <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/> | |
439 | -- </fieldType> | |
440 | -- --> | |
441 | -+ <!-- Numeric field types that manipulate the value into | |
442 | -+ a string value that isn't human-readable in its internal form, | |
443 | -+ but with a lexicographic ordering the same as the numeric ordering, | |
444 | -+ so that range queries work correctly. --> | |
445 | -+ <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
446 | -+ <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
447 | -+ <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
448 | -+ <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/> | |
449 | -+ | |
450 | -+ <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
451 | -+ <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
452 | -+ <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
453 | -+ <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/> | |
454 | - | |
455 | -- <!-- A text field that only splits on whitespace for exact matching of words --> | |
456 | -- <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100"> | |
457 | -- <analyzer> | |
458 | -- <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
459 | -- </analyzer> | |
460 | -- </fieldType> | |
461 | -+ <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/> | |
462 | -+ <!-- A Trie based date field for faster date range queries and date faceting. --> | |
463 | -+ <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/> | |
464 | -+ | |
465 | -+ <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/> | |
466 | -+ <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/> | |
467 | -+ <fieldtype name="geohash" class="solr.GeoHashField"/> | |
468 | - | |
469 | -- <!-- A general text field that has reasonable, generic | |
470 | -- cross-language defaults: it tokenizes with StandardTokenizer, | |
471 | -- removes stop words from case-insensitive "stopwords.txt" | |
472 | -- (empty by default), and down cases. At query time only, it | |
473 | -- also applies synonyms. --> | |
474 | - <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> | |
475 | - <analyzer type="index"> | |
476 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
477 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> | |
478 | -+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> | |
479 | - <!-- in this example, we will only use synonyms at query time | |
480 | - <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> | |
481 | - --> | |
482 | -@@ -464,35 +55,26 @@ | |
483 | - </analyzer> | |
484 | - <analyzer type="query"> | |
485 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
486 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> | |
487 | -+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> | |
488 | - <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> | |
489 | - <filter class="solr.LowerCaseFilterFactory"/> | |
490 | - </analyzer> | |
491 | - </fieldType> | |
492 | - | |
493 | -- <!-- A text field with defaults appropriate for English: it | |
494 | -- tokenizes with StandardTokenizer, removes English stop words | |
495 | -- (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and | |
496 | -- finally applies Porter's stemming. The query time analyzer | |
497 | -- also applies synonyms from synonyms.txt. --> | |
498 | - <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100"> | |
499 | - <analyzer type="index"> | |
500 | - <tokenizer class="solr.StandardTokenizerFactory"/> | |
501 | -- <!-- in this example, we will only use synonyms at query time | |
502 | -- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> | |
503 | -- --> | |
504 | -- <!-- Case insensitive stop word removal. | |
505 | -- --> | |
506 | - <filter class="solr.StopFilterFactory" | |
507 | - ignoreCase="true" | |
508 | - words="lang/stopwords_en.txt" | |
509 | -+ enablePositionIncrements="true" | |
510 | - /> | |
511 | - <filter class="solr.LowerCaseFilterFactory"/> | |
512 | -- <filter class="solr.EnglishPossessiveFilterFactory"/> | |
513 | -+ <filter class="solr.EnglishPossessiveFilterFactory"/> | |
514 | - <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
515 | -- <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory: | |
516 | -- <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
517 | -- --> | |
518 | -+ <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory: | |
519 | -+ <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
520 | -+ --> | |
521 | - <filter class="solr.PorterStemFilterFactory"/> | |
522 | - </analyzer> | |
523 | - <analyzer type="query"> | |
524 | -@@ -501,634 +83,163 @@ | |
525 | - <filter class="solr.StopFilterFactory" | |
526 | - ignoreCase="true" | |
527 | - words="lang/stopwords_en.txt" | |
528 | -+ enablePositionIncrements="true" | |
529 | - /> | |
530 | - <filter class="solr.LowerCaseFilterFactory"/> | |
531 | -- <filter class="solr.EnglishPossessiveFilterFactory"/> | |
532 | -+ <filter class="solr.EnglishPossessiveFilterFactory"/> | |
533 | - <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
534 | -- <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory: | |
535 | -- <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
536 | -- --> | |
537 | -- <filter class="solr.PorterStemFilterFactory"/> | |
538 | -- </analyzer> | |
539 | -- </fieldType> | |
540 | -- | |
541 | -- <!-- A text field with defaults appropriate for English, plus | |
542 | -- aggressive word-splitting and autophrase features enabled. | |
543 | -- This field is just like text_en, except it adds | |
544 | -- WordDelimiterFilter to enable splitting and matching of | |
545 | -- words on case-change, alpha numeric boundaries, and | |
546 | -- non-alphanumeric chars. This means certain compound word | |
547 | -- cases will work, for example query "wi fi" will match | |
548 | -- document "WiFi" or "wi-fi". | |
549 | -- --> | |
550 | -- <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"> | |
551 | -- <analyzer type="index"> | |
552 | -- <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
553 | -- <!-- in this example, we will only use synonyms at query time | |
554 | -- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> | |
555 | -- --> | |
556 | -- <!-- Case insensitive stop word removal. | |
557 | -+ <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory: | |
558 | -+ <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
559 | - --> | |
560 | -- <filter class="solr.StopFilterFactory" | |
561 | -- ignoreCase="true" | |
562 | -- words="lang/stopwords_en.txt" | |
563 | -- /> | |
564 | -- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/> | |
565 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
566 | -- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
567 | -- <filter class="solr.PorterStemFilterFactory"/> | |
568 | -- </analyzer> | |
569 | -- <analyzer type="query"> | |
570 | -- <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
571 | -- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> | |
572 | -- <filter class="solr.StopFilterFactory" | |
573 | -- ignoreCase="true" | |
574 | -- words="lang/stopwords_en.txt" | |
575 | -- /> | |
576 | -- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> | |
577 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
578 | -- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
579 | - <filter class="solr.PorterStemFilterFactory"/> | |
580 | - </analyzer> | |
581 | - </fieldType> | |
582 | - | |
583 | -- <!-- Less flexible matching, but less false matches. Probably not ideal for product names, | |
584 | -- but may be good for SKUs. Can insert dashes in the wrong place and still match. --> | |
585 | -- <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"> | |
586 | -+ <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100"> | |
587 | - <analyzer> | |
588 | - <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
589 | -- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/> | |
590 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"/> | |
591 | -- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/> | |
592 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
593 | -- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/> | |
594 | -- <filter class="solr.EnglishMinimalStemFilterFactory"/> | |
595 | -- <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes | |
596 | -- possible with WordDelimiterFilter in conjuncton with stemming. --> | |
597 | -- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> | |
598 | - </analyzer> | |
599 | - </fieldType> | |
600 | - | |
601 | -- <!-- Just like text_general except it reverses the characters of | |
602 | -- each token, to enable more efficient leading wildcard queries. --> | |
603 | -- <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100"> | |
604 | -+ <fieldType name="ngram" class="solr.TextField" > | |
605 | - <analyzer type="index"> | |
606 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
607 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> | |
608 | -+ <tokenizer class="solr.KeywordTokenizerFactory"/> | |
609 | - <filter class="solr.LowerCaseFilterFactory"/> | |
610 | -- <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true" | |
611 | -- maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/> | |
612 | -+ <filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" /> | |
613 | - </analyzer> | |
614 | - <analyzer type="query"> | |
615 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
616 | -- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> | |
617 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> | |
618 | -+ <tokenizer class="solr.KeywordTokenizerFactory"/> | |
619 | - <filter class="solr.LowerCaseFilterFactory"/> | |
620 | - </analyzer> | |
621 | - </fieldType> | |
622 | - | |
623 | -- <!-- charFilter + WhitespaceTokenizer --> | |
624 | -- <!-- | |
625 | -- <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" > | |
626 | -- <analyzer> | |
627 | -- <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/> | |
628 | -- <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
629 | -+ <fieldType name="edge_ngram" class="solr.TextField" positionIncrementGap="1"> | |
630 | -+ <analyzer type="index"> | |
631 | -+ <tokenizer class="solr.WhitespaceTokenizerFactory" /> | |
632 | -+ <filter class="solr.LowerCaseFilterFactory" /> | |
633 | -+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> | |
634 | -+ <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front" /> | |
635 | - </analyzer> | |
636 | -- </fieldType> | |
637 | -- --> | |
638 | -- | |
639 | -- <!-- This is an example of using the KeywordTokenizer along | |
640 | -- With various TokenFilterFactories to produce a sortable field | |
641 | -- that does not include some properties of the source text | |
642 | -- --> | |
643 | -- <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true"> | |
644 | -- <analyzer> | |
645 | -- <!-- KeywordTokenizer does no actual tokenizing, so the entire | |
646 | -- input string is preserved as a single token | |
647 | -- --> | |
648 | -- <tokenizer class="solr.KeywordTokenizerFactory"/> | |
649 | -- <!-- The LowerCase TokenFilter does what you expect, which can be | |
650 | -- when you want your sorting to be case insensitive | |
651 | -- --> | |
652 | -+ <analyzer type="query"> | |
653 | -+ <tokenizer class="solr.WhitespaceTokenizerFactory" /> | |
654 | - <filter class="solr.LowerCaseFilterFactory" /> | |
655 | -- <!-- The TrimFilter removes any leading or trailing whitespace --> | |
656 | -- <filter class="solr.TrimFilterFactory" /> | |
657 | -- <!-- The PatternReplaceFilter gives you the flexibility to use | |
658 | -- Java Regular expression to replace any sequence of characters | |
659 | -- matching a pattern with an arbitrary replacement string, | |
660 | -- which may include back references to portions of the original | |
661 | -- string matched by the pattern. | |
662 | -- | |
663 | -- See the Java Regular Expression documentation for more | |
664 | -- information on pattern and replacement string syntax. | |
665 | -- | |
666 | -- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html | |
667 | -- --> | |
668 | -- <filter class="solr.PatternReplaceFilterFactory" | |
669 | -- pattern="([^a-z])" replacement="" replace="all" | |
670 | -- /> | |
671 | -+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> | |
672 | - </analyzer> | |
673 | - </fieldType> | |
674 | -- | |
675 | -- <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" > | |
676 | -- <analyzer> | |
677 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
678 | -- <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/> | |
679 | -- </analyzer> | |
680 | -- </fieldtype> | |
681 | -+ </types> | |
682 | - | |
683 | -- <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" > | |
684 | -- <analyzer> | |
685 | -- <tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
686 | -- <!-- | |
687 | -- The DelimitedPayloadTokenFilter can put payloads on tokens... for example, | |
688 | -- a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f | |
689 | -- Attributes of the DelimitedPayloadTokenFilterFactory : | |
690 | -- "delimiter" - a one character delimiter. Default is | (pipe) | |
691 | -- "encoder" - how to encode the following value into a playload | |
692 | -- float -> org.apache.lucene.analysis.payloads.FloatEncoder, | |
693 | -- integer -> o.a.l.a.p.IntegerEncoder | |
694 | -- identity -> o.a.l.a.p.IdentityEncoder | |
695 | -- Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor. | |
696 | -- --> | |
697 | -- <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/> | |
698 | -- </analyzer> | |
699 | -- </fieldtype> | |
700 | -+ <fields> | |
701 | -+ <!-- general --> | |
702 | -+ <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/> | |
703 | -+ <field name="django_ct" type="string" indexed="true" stored="true" multiValued="false"/> | |
704 | -+ <field name="django_id" type="string" indexed="true" stored="true" multiValued="false"/> | |
705 | - | |
706 | -- <!-- lowercases the entire field value, keeping it as a single token. --> | |
707 | -- <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100"> | |
708 | -- <analyzer> | |
709 | -- <tokenizer class="solr.KeywordTokenizerFactory"/> | |
710 | -- <filter class="solr.LowerCaseFilterFactory" /> | |
711 | -- </analyzer> | |
712 | -- </fieldType> | |
713 | -+ <dynamicField name="*_i" type="int" indexed="true" stored="true"/> | |
714 | -+ <dynamicField name="*_s" type="string" indexed="true" stored="true"/> | |
715 | -+ <dynamicField name="*_l" type="long" indexed="true" stored="true"/> | |
716 | -+ <dynamicField name="*_t" type="text_en" indexed="true" stored="true"/> | |
717 | -+ <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/> | |
718 | -+ <dynamicField name="*_f" type="float" indexed="true" stored="true"/> | |
719 | -+ <dynamicField name="*_d" type="double" indexed="true" stored="true"/> | |
720 | -+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/> | |
721 | -+ <dynamicField name="*_p" type="location" indexed="true" stored="true"/> | |
722 | -+ <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/> | |
723 | - | |
724 | -- <!-- | |
725 | -- Example of using PathHierarchyTokenizerFactory at index time, so | |
726 | -- queries for paths match documents at that path, or in descendent paths | |
727 | -- --> | |
728 | -- <fieldType name="descendent_path" class="solr.TextField"> | |
729 | -- <analyzer type="index"> | |
730 | -- <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" /> | |
731 | -- </analyzer> | |
732 | -- <analyzer type="query"> | |
733 | -- <tokenizer class="solr.KeywordTokenizerFactory" /> | |
734 | -- </analyzer> | |
735 | -- </fieldType> | |
736 | -- <!-- | |
737 | -- Example of using PathHierarchyTokenizerFactory at query time, so | |
738 | -- queries for paths match documents at that path, or in ancestor paths | |
739 | -- --> | |
740 | -- <fieldType name="ancestor_path" class="solr.TextField"> | |
741 | -- <analyzer type="index"> | |
742 | -- <tokenizer class="solr.KeywordTokenizerFactory" /> | |
743 | -- </analyzer> | |
744 | -- <analyzer type="query"> | |
745 | -- <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" /> | |
746 | -- </analyzer> | |
747 | -- </fieldType> | |
748 | - | |
749 | -- <!-- since fields of this type are by default not stored or indexed, | |
750 | -- any data added to them will be ignored outright. --> | |
751 | -- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" /> | |
752 | -- | |
753 | -- <!-- This point type indexes the coordinates as separate fields (subFields) | |
754 | -- If subFieldType is defined, it references a type, and a dynamic field | |
755 | -- definition is created matching *___<typename>. Alternately, if | |
756 | -- subFieldSuffix is defined, that is used to create the subFields. | |
757 | -- Example: if subFieldType="double", then the coordinates would be | |
758 | -- indexed in fields myloc_0___double,myloc_1___double. | |
759 | -- Example: if subFieldSuffix="_d" then the coordinates would be indexed | |
760 | -- in fields myloc_0_d,myloc_1_d | |
761 | -- The subFields are an implementation detail of the fieldType, and end | |
762 | -- users normally should not need to know about them. | |
763 | -- --> | |
764 | -- <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/> | |
765 | -+ <field name="fullname_and_username" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
766 | - | |
767 | -- <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. --> | |
768 | -- <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/> | |
769 | -+ <field name="description" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
770 | - | |
771 | -- <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes. | |
772 | -- For more information about this and other Spatial fields new to Solr 4, see: | |
773 | -- http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4 | |
774 | -- --> | |
775 | -- <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" | |
776 | -- geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" /> | |
777 | -- | |
778 | -- <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType | |
779 | -- Parameters: | |
780 | -- defaultCurrency: Specifies the default currency if none specified. Defaults to "USD" | |
781 | -- precisionStep: Specifies the precisionStep for the TrieLong field used for the amount | |
782 | -- providerClass: Lets you plug in other exchange provider backend: | |
783 | -- solr.FileExchangeRateProvider is the default and takes one parameter: | |
784 | -- currencyConfig: name of an xml file holding exchange rates | |
785 | -- solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org: | |
786 | -- ratesFileLocation: URL or path to rates JSON file (default latest.json on the web) | |
787 | -- refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60) | |
788 | -- --> | |
789 | -- <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" /> | |
790 | -- | |
791 | -- | |
792 | -- | |
793 | -- <!-- some examples for different languages (generally ordered by ISO code) --> | |
794 | -- | |
795 | -- <!-- Arabic --> | |
796 | -- <fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100"> | |
797 | -- <analyzer> | |
798 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
799 | -- <!-- for any non-arabic --> | |
800 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
801 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" /> | |
802 | -- <!-- normalizes ﻯ to ﻱ, etc --> | |
803 | -- <filter class="solr.ArabicNormalizationFilterFactory"/> | |
804 | -- <filter class="solr.ArabicStemFilterFactory"/> | |
805 | -- </analyzer> | |
806 | -- </fieldType> | |
807 | -+ <field name="text" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
808 | - | |
809 | -- <!-- Bulgarian --> | |
810 | -- <fieldType name="text_bg" class="solr.TextField" positionIncrementGap="100"> | |
811 | -- <analyzer> | |
812 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
813 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
814 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_bg.txt" /> | |
815 | -- <filter class="solr.BulgarianStemFilterFactory"/> | |
816 | -- </analyzer> | |
817 | -- </fieldType> | |
818 | -- | |
819 | -- <!-- Catalan --> | |
820 | -- <fieldType name="text_ca" class="solr.TextField" positionIncrementGap="100"> | |
821 | -- <analyzer> | |
822 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
823 | -- <!-- removes l', etc --> | |
824 | -- <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ca.txt"/> | |
825 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
826 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ca.txt" /> | |
827 | -- <filter class="solr.SnowballPorterFilterFactory" language="Catalan"/> | |
828 | -- </analyzer> | |
829 | -- </fieldType> | |
830 | -- | |
831 | -- <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) --> | |
832 | -- <fieldType name="text_cjk" class="solr.TextField" positionIncrementGap="100"> | |
833 | -- <analyzer> | |
834 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
835 | -- <!-- normalize width before bigram, as e.g. half-width dakuten combine --> | |
836 | -- <filter class="solr.CJKWidthFilterFactory"/> | |
837 | -- <!-- for any non-CJK --> | |
838 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
839 | -- <filter class="solr.CJKBigramFilterFactory"/> | |
840 | -- </analyzer> | |
841 | -- </fieldType> | |
842 | -+ <field name="modified_by_url" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
843 | - | |
844 | -- <!-- Czech --> | |
845 | -- <fieldType name="text_cz" class="solr.TextField" positionIncrementGap="100"> | |
846 | -- <analyzer> | |
847 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
848 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
849 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_cz.txt" /> | |
850 | -- <filter class="solr.CzechStemFilterFactory"/> | |
851 | -- </analyzer> | |
852 | -- </fieldType> | |
853 | -- | |
854 | -- <!-- Danish --> | |
855 | -- <fieldType name="text_da" class="solr.TextField" positionIncrementGap="100"> | |
856 | -- <analyzer> | |
857 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
858 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
859 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_da.txt" format="snowball" /> | |
860 | -- <filter class="solr.SnowballPorterFilterFactory" language="Danish"/> | |
861 | -- </analyzer> | |
862 | -- </fieldType> | |
863 | -- | |
864 | -- <!-- German --> | |
865 | -- <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100"> | |
866 | -- <analyzer> | |
867 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
868 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
869 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" /> | |
870 | -- <filter class="solr.GermanNormalizationFilterFactory"/> | |
871 | -- <filter class="solr.GermanLightStemFilterFactory"/> | |
872 | -- <!-- less aggressive: <filter class="solr.GermanMinimalStemFilterFactory"/> --> | |
873 | -- <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="German2"/> --> | |
874 | -- </analyzer> | |
875 | -- </fieldType> | |
876 | -- | |
877 | -- <!-- Greek --> | |
878 | -- <fieldType name="text_el" class="solr.TextField" positionIncrementGap="100"> | |
879 | -- <analyzer> | |
880 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
881 | -- <!-- greek specific lowercase for sigma --> | |
882 | -- <filter class="solr.GreekLowerCaseFilterFactory"/> | |
883 | -- <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_el.txt" /> | |
884 | -- <filter class="solr.GreekStemFilterFactory"/> | |
885 | -- </analyzer> | |
886 | -- </fieldType> | |
887 | -- | |
888 | -- <!-- Spanish --> | |
889 | -- <fieldType name="text_es" class="solr.TextField" positionIncrementGap="100"> | |
890 | -- <analyzer> | |
891 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
892 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
893 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_es.txt" format="snowball" /> | |
894 | -- <filter class="solr.SpanishLightStemFilterFactory"/> | |
895 | -- <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Spanish"/> --> | |
896 | -- </analyzer> | |
897 | -- </fieldType> | |
898 | -- | |
899 | -- <!-- Basque --> | |
900 | -- <fieldType name="text_eu" class="solr.TextField" positionIncrementGap="100"> | |
901 | -- <analyzer> | |
902 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
903 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
904 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_eu.txt" /> | |
905 | -- <filter class="solr.SnowballPorterFilterFactory" language="Basque"/> | |
906 | -- </analyzer> | |
907 | -- </fieldType> | |
908 | -- | |
909 | -- <!-- Persian --> | |
910 | -- <fieldType name="text_fa" class="solr.TextField" positionIncrementGap="100"> | |
911 | -- <analyzer> | |
912 | -- <!-- for ZWNJ --> | |
913 | -- <charFilter class="solr.PersianCharFilterFactory"/> | |
914 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
915 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
916 | -- <filter class="solr.ArabicNormalizationFilterFactory"/> | |
917 | -- <filter class="solr.PersianNormalizationFilterFactory"/> | |
918 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fa.txt" /> | |
919 | -- </analyzer> | |
920 | -- </fieldType> | |
921 | -- | |
922 | -- <!-- Finnish --> | |
923 | -- <fieldType name="text_fi" class="solr.TextField" positionIncrementGap="100"> | |
924 | -- <analyzer> | |
925 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
926 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
927 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fi.txt" format="snowball" /> | |
928 | -- <filter class="solr.SnowballPorterFilterFactory" language="Finnish"/> | |
929 | -- <!-- less aggressive: <filter class="solr.FinnishLightStemFilterFactory"/> --> | |
930 | -- </analyzer> | |
931 | -- </fieldType> | |
932 | -- | |
933 | -- <!-- French --> | |
934 | -- <fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100"> | |
935 | -- <analyzer> | |
936 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
937 | -- <!-- removes l', etc --> | |
938 | -- <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/> | |
939 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
940 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fr.txt" format="snowball" /> | |
941 | -- <filter class="solr.FrenchLightStemFilterFactory"/> | |
942 | -- <!-- less aggressive: <filter class="solr.FrenchMinimalStemFilterFactory"/> --> | |
943 | -- <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="French"/> --> | |
944 | -- </analyzer> | |
945 | -- </fieldType> | |
946 | -- | |
947 | -- <!-- Irish --> | |
948 | -- <fieldType name="text_ga" class="solr.TextField" positionIncrementGap="100"> | |
949 | -- <analyzer> | |
950 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
951 | -- <!-- removes d', etc --> | |
952 | -- <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ga.txt"/> | |
953 | -- <!-- removes n-, etc. position increments is intentionally false! --> | |
954 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/hyphenations_ga.txt"/> | |
955 | -- <filter class="solr.IrishLowerCaseFilterFactory"/> | |
956 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ga.txt"/> | |
957 | -- <filter class="solr.SnowballPorterFilterFactory" language="Irish"/> | |
958 | -- </analyzer> | |
959 | -- </fieldType> | |
960 | -- | |
961 | -- <!-- Galician --> | |
962 | -- <fieldType name="text_gl" class="solr.TextField" positionIncrementGap="100"> | |
963 | -- <analyzer> | |
964 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
965 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
966 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_gl.txt" /> | |
967 | -- <filter class="solr.GalicianStemFilterFactory"/> | |
968 | -- <!-- less aggressive: <filter class="solr.GalicianMinimalStemFilterFactory"/> --> | |
969 | -- </analyzer> | |
970 | -- </fieldType> | |
971 | -- | |
972 | -- <!-- Hindi --> | |
973 | -- <fieldType name="text_hi" class="solr.TextField" positionIncrementGap="100"> | |
974 | -- <analyzer> | |
975 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
976 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
977 | -- <!-- normalizes unicode representation --> | |
978 | -- <filter class="solr.IndicNormalizationFilterFactory"/> | |
979 | -- <!-- normalizes variation in spelling --> | |
980 | -- <filter class="solr.HindiNormalizationFilterFactory"/> | |
981 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hi.txt" /> | |
982 | -- <filter class="solr.HindiStemFilterFactory"/> | |
983 | -- </analyzer> | |
984 | -- </fieldType> | |
985 | -- | |
986 | -- <!-- Hungarian --> | |
987 | -- <fieldType name="text_hu" class="solr.TextField" positionIncrementGap="100"> | |
988 | -- <analyzer> | |
989 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
990 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
991 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hu.txt" format="snowball" /> | |
992 | -- <filter class="solr.SnowballPorterFilterFactory" language="Hungarian"/> | |
993 | -- <!-- less aggressive: <filter class="solr.HungarianLightStemFilterFactory"/> --> | |
994 | -- </analyzer> | |
995 | -- </fieldType> | |
996 | -- | |
997 | -- <!-- Armenian --> | |
998 | -- <fieldType name="text_hy" class="solr.TextField" positionIncrementGap="100"> | |
999 | -- <analyzer> | |
1000 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1001 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1002 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hy.txt" /> | |
1003 | -- <filter class="solr.SnowballPorterFilterFactory" language="Armenian"/> | |
1004 | -- </analyzer> | |
1005 | -- </fieldType> | |
1006 | -- | |
1007 | -- <!-- Indonesian --> | |
1008 | -- <fieldType name="text_id" class="solr.TextField" positionIncrementGap="100"> | |
1009 | -- <analyzer> | |
1010 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1011 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1012 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_id.txt" /> | |
1013 | -- <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false --> | |
1014 | -- <filter class="solr.IndonesianStemFilterFactory" stemDerivational="true"/> | |
1015 | -- </analyzer> | |
1016 | -- </fieldType> | |
1017 | -- | |
1018 | -- <!-- Italian --> | |
1019 | -- <fieldType name="text_it" class="solr.TextField" positionIncrementGap="100"> | |
1020 | -- <analyzer> | |
1021 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1022 | -- <!-- removes l', etc --> | |
1023 | -- <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_it.txt"/> | |
1024 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1025 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_it.txt" format="snowball" /> | |
1026 | -- <filter class="solr.ItalianLightStemFilterFactory"/> | |
1027 | -- <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Italian"/> --> | |
1028 | -- </analyzer> | |
1029 | -- </fieldType> | |
1030 | -- | |
1031 | -- <!-- Japanese using morphological analysis (see text_cjk for a configuration using bigramming) | |
1032 | -+ <field name="collaborators" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1033 | - | |
1034 | -- NOTE: If you want to optimize search for precision, use default operator AND in your query | |
1035 | -- parser config with <solrQueryParser defaultOperator="AND"/> further down in this file. Use | |
1036 | -- OR if you would like to optimize for recall (default). | |
1037 | -- --> | |
1038 | -- <fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false"> | |
1039 | -- <analyzer> | |
1040 | -- <!-- Kuromoji Japanese morphological analyzer/tokenizer (JapaneseTokenizer) | |
1041 | -+ <field name="icon_name" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1042 | - | |
1043 | -- Kuromoji has a search mode (default) that does segmentation useful for search. A heuristic | |
1044 | -- is used to segment compounds into its parts and the compound itself is kept as synonym. | |
1045 | -+ <field name="tag" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1046 | - | |
1047 | -- Valid values for attribute mode are: | |
1048 | -- normal: regular segmentation | |
1049 | -- search: segmentation useful for search with synonyms compounds (default) | |
1050 | -- extended: same as search mode, but unigrams unknown words (experimental) | |
1051 | -+ <field name="fullname" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1052 | - | |
1053 | -- For some applications it might be good to use search mode for indexing and normal mode for | |
1054 | -- queries to reduce recall and prevent parts of compounds from being matched and highlighted. | |
1055 | -- Use <analyzer type="index"> and <analyzer type="query"> for this and mode normal in query. | |
1056 | -+ <field name="mailinglist_url" type="string" indexed="false" stored="true" multiValued="false" /> | |
1057 | - | |
1058 | -- Kuromoji also has a convenient user dictionary feature that allows overriding the statistical | |
1059 | -- model with your own entries for segmentation, part-of-speech tags and readings without a need | |
1060 | -- to specify weights. Notice that user dictionaries have not been subject to extensive testing. | |
1061 | -+ <field name="latest_description" type="string" indexed="false" stored="true" multiValued="false" /> | |
1062 | - | |
1063 | -- User dictionary attributes are: | |
1064 | -- userDictionary: user dictionary filename | |
1065 | -- userDictionaryEncoding: user dictionary encoding (default is UTF-8) | |
1066 | -+ <field name="hits" type="long" indexed="true" stored="true" multiValued="false" /> | |
1067 | - | |
1068 | -- See lang/userdict_ja.txt for a sample user dictionary file. | |
1069 | -+ <field name="modified_by" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1070 | - | |
1071 | -- Punctuation characters are discarded by default. Use discardPunctuation="false" to keep them. | |
1072 | -+ <field name="title" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1073 | - | |
1074 | -- See http://wiki.apache.org/solr/JapaneseLanguageSupport for more on Japanese language support. | |
1075 | -- --> | |
1076 | -- <tokenizer class="solr.JapaneseTokenizerFactory" mode="search"/> | |
1077 | -- <!--<tokenizer class="solr.JapaneseTokenizerFactory" mode="search" userDictionary="lang/userdict_ja.txt"/>--> | |
1078 | -- <!-- Reduces inflected verbs and adjectives to their base/dictionary forms (辞書形) --> | |
1079 | -- <filter class="solr.JapaneseBaseFormFilterFactory"/> | |
1080 | -- <!-- Removes tokens with certain part-of-speech tags --> | |
1081 | -- <filter class="solr.JapanesePartOfSpeechStopFilterFactory" tags="lang/stoptags_ja.txt" /> | |
1082 | -- <!-- Normalizes full-width romaji to half-width and half-width kana to full-width (Unicode NFKC subset) --> | |
1083 | -- <filter class="solr.CJKWidthFilterFactory"/> | |
1084 | -- <!-- Removes common tokens typically not useful for search, but have a negative effect on ranking --> | |
1085 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ja.txt" /> | |
1086 | -- <!-- Normalizes common katakana spelling variations by removing any last long sound character (U+30FC) --> | |
1087 | -- <filter class="solr.JapaneseKatakanaStemFilterFactory" minimumLength="4"/> | |
1088 | -- <!-- Lower-cases romaji characters --> | |
1089 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1090 | -- </analyzer> | |
1091 | -- </fieldType> | |
1092 | -- | |
1093 | -- <!-- Latvian --> | |
1094 | -- <fieldType name="text_lv" class="solr.TextField" positionIncrementGap="100"> | |
1095 | -- <analyzer> | |
1096 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1097 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1098 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_lv.txt" /> | |
1099 | -- <filter class="solr.LatvianStemFilterFactory"/> | |
1100 | -- </analyzer> | |
1101 | -- </fieldType> | |
1102 | -- | |
1103 | -- <!-- Dutch --> | |
1104 | -- <fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100"> | |
1105 | -- <analyzer> | |
1106 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1107 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1108 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_nl.txt" format="snowball" /> | |
1109 | -- <filter class="solr.StemmerOverrideFilterFactory" dictionary="lang/stemdict_nl.txt" ignoreCase="false"/> | |
1110 | -- <filter class="solr.SnowballPorterFilterFactory" language="Dutch"/> | |
1111 | -- </analyzer> | |
1112 | -- </fieldType> | |
1113 | -- | |
1114 | -- <!-- Norwegian --> | |
1115 | -- <fieldType name="text_no" class="solr.TextField" positionIncrementGap="100"> | |
1116 | -- <analyzer> | |
1117 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1118 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1119 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" /> | |
1120 | -- <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/> | |
1121 | -- <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory" variant="nb"/> --> | |
1122 | -- <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory" variant="nb"/> --> | |
1123 | -- <!-- The "light" and "minimal" stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both --> | |
1124 | -- </analyzer> | |
1125 | -- </fieldType> | |
1126 | -- | |
1127 | -- <!-- Portuguese --> | |
1128 | -- <fieldType name="text_pt" class="solr.TextField" positionIncrementGap="100"> | |
1129 | -- <analyzer> | |
1130 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1131 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1132 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pt.txt" format="snowball" /> | |
1133 | -- <filter class="solr.PortugueseLightStemFilterFactory"/> | |
1134 | -- <!-- less aggressive: <filter class="solr.PortugueseMinimalStemFilterFactory"/> --> | |
1135 | -- <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Portuguese"/> --> | |
1136 | -- <!-- most aggressive: <filter class="solr.PortugueseStemFilterFactory"/> --> | |
1137 | -- </analyzer> | |
1138 | -- </fieldType> | |
1139 | -- | |
1140 | -- <!-- Romanian --> | |
1141 | -- <fieldType name="text_ro" class="solr.TextField" positionIncrementGap="100"> | |
1142 | -- <analyzer> | |
1143 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1144 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1145 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ro.txt" /> | |
1146 | -- <filter class="solr.SnowballPorterFilterFactory" language="Romanian"/> | |
1147 | -- </analyzer> | |
1148 | -- </fieldType> | |
1149 | -- | |
1150 | -- <!-- Russian --> | |
1151 | -- <fieldType name="text_ru" class="solr.TextField" positionIncrementGap="100"> | |
1152 | -- <analyzer> | |
1153 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1154 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1155 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" /> | |
1156 | -- <filter class="solr.SnowballPorterFilterFactory" language="Russian"/> | |
1157 | -- <!-- less aggressive: <filter class="solr.RussianLightStemFilterFactory"/> --> | |
1158 | -- </analyzer> | |
1159 | -- </fieldType> | |
1160 | -- | |
1161 | -- <!-- Swedish --> | |
1162 | -- <fieldType name="text_sv" class="solr.TextField" positionIncrementGap="100"> | |
1163 | -- <analyzer> | |
1164 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1165 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1166 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_sv.txt" format="snowball" /> | |
1167 | -- <filter class="solr.SnowballPorterFilterFactory" language="Swedish"/> | |
1168 | -- <!-- less aggressive: <filter class="solr.SwedishLightStemFilterFactory"/> --> | |
1169 | -- </analyzer> | |
1170 | -- </fieldType> | |
1171 | -- | |
1172 | -- <!-- Thai --> | |
1173 | -- <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100"> | |
1174 | -- <analyzer> | |
1175 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1176 | -- <filter class="solr.LowerCaseFilterFactory"/> | |
1177 | -- <filter class="solr.ThaiWordFilterFactory"/> | |
1178 | -- <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" /> | |
1179 | -- </analyzer> | |
1180 | -- </fieldType> | |
1181 | -- | |
1182 | -- <!-- Turkish --> | |
1183 | -- <fieldType name="text_tr" class="solr.TextField" positionIncrementGap="100"> | |
1184 | -- <analyzer> | |
1185 | -- <tokenizer class="solr.StandardTokenizerFactory"/> | |
1186 | -- <filter class="solr.TurkishLowerCaseFilterFactory"/> | |
1187 | -- <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_tr.txt" /> | |
1188 | -- <filter class="solr.SnowballPorterFilterFactory" language="Turkish"/> | |
1189 | -- </analyzer> | |
1190 | -- </fieldType> | |
1191 | -+ <field name="url" type="string" indexed="false" stored="true" multiValued="false" /> | |
1192 | -+ | |
1193 | -+ <field name="created" type="date" indexed="true" stored="true" multiValued="false" /> | |
1194 | -+ | |
1195 | -+ <field name="modified" type="date" indexed="true" stored="true" multiValued="false" /> | |
1196 | -+ | |
1197 | -+ <field name="latest_message_pk" type="long" indexed="false" stored="true" multiValued="false" /> | |
1198 | -+ | |
1199 | -+ <field name="score" type="long" indexed="true" stored="true" multiValued="false" /> | |
1200 | -+ | |
1201 | -+ <field name="author_url" type="string" indexed="false" stored="true" multiValued="false" /> | |
1202 | -+ | |
1203 | -+ <field name="author" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1204 | -+ | |
1205 | -+ <field name="type" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1206 | -+ | |
1207 | -+ <field name="username" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1208 | -+ | |
1209 | -+ <field name="webpage" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1210 | -+ | |
1211 | -+ <field name="message_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
1212 | -+ | |
1213 | -+ <field name="institution" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1214 | -+ | |
1215 | -+ <field name="google_talk" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1216 | -+ | |
1217 | -+ <field name="name" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1218 | -+ | |
1219 | -+ <field name="changeset_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
1220 | -+ | |
1221 | -+ <field name="role" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1222 | -+ | |
1223 | -+ <field name="contribution_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
1224 | -+ | |
1225 | -+ <field name="ticket_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
1226 | -+ | |
1227 | -+ <field name="wiki_count" type="long" indexed="true" stored="false" multiValued="false" /> | |
1228 | -+ | |
1229 | -+ <field name="email" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1230 | -+ | |
1231 | -+ <field name="used_by" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1232 | -+ | |
1233 | -+ <field name="size" type="long" indexed="true" stored="false" multiValued="false" /> | |
1234 | -+ | |
1235 | -+ <field name="mimetype" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1236 | -+ | |
1237 | -+ <field name="filename" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1238 | -+ | |
1239 | -+ <field name="repository_name" type="text_en" indexed="true" stored="false" multiValued="false" /> | |
1240 | -+ | |
1241 | -+ <field name="reporter" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1242 | -+ | |
1243 | -+ <field name="milestone" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1244 | -+ | |
1245 | -+ <field name="keywords" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1246 | -+ | |
1247 | -+ <field name="severity" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1248 | -+ | |
1249 | -+ <field name="component" type="text_en" indexed="true" stored="true" multiValued="false" /> | |
1250 | -+ | |
1251 | -+ </fields> | |
1252 | -+ | |
1253 | -+ <!-- field to use to determine and enforce document uniqueness. --> | |
1254 | -+ <uniqueKey>id</uniqueKey> | |
1255 | - | |
1256 | -- </types> | |
1257 | -- | |
1258 | -- <!-- Similarity is the scoring routine for each document vs. a query. | |
1259 | -- A custom Similarity or SimilarityFactory may be specified here, but | |
1260 | -- the default is fine for most applications. | |
1261 | -- For more info: http://wiki.apache.org/solr/SchemaXml#Similarity | |
1262 | -- --> | |
1263 | -- <!-- | |
1264 | -- <similarity class="com.example.solr.CustomSimilarityFactory"> | |
1265 | -- <str name="paramkey">param value</str> | |
1266 | -- </similarity> | |
1267 | -- --> | |
1268 | -+ <!-- field for the QueryParser to use when an explicit fieldname is absent --> | |
1269 | -+ <defaultSearchField>text</defaultSearchField> | |
1270 | - | |
1271 | --</schema> | |
1272 | -+ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" --> | |
1273 | -+ <solrQueryParser defaultOperator="AND"/> | |
1274 | -+</schema> | |
1275 | -\ No newline at end of file | |
1276 | -diff -uNr solr-4.6.1-orig/example/solr/collection1/conf/solrconfig.xml solr-4.6.1/example/solr/collection1/conf/solrconfig.xml | |
1277 | ---- solr-4.6.1-orig/example/solr/collection1/conf/solrconfig.xml 2013-11-18 04:02:57.000000000 +0000 | |
1278 | -+++ solr-4.6.1/example/solr/collection1/conf/solrconfig.xml 2014-10-28 12:09:32.513699426 +0000 | |
1279 | -@@ -342,10 +342,6 @@ | |
1280 | - is recommended (see below). | |
1281 | - "dir" - the target directory for transaction logs, defaults to the | |
1282 | - solr data directory. --> | |
1283 | -- <updateLog> | |
1284 | -- <str name="dir">${solr.ulog.dir:}</str> | |
1285 | -- </updateLog> | |
1286 | -- | |
1287 | - <!-- AutoCommit | |
1288 | - | |
1289 | - Perform a hard commit automatically under certain conditions. | |
1290 | -Binary files solr-4.6.1-orig/example/solr/solr.war and solr-4.6.1/example/solr/solr.war differ | |
1291 | -diff -uNr solr-4.6.1-orig/scripts/solr solr-4.6.1/scripts/solr | |
1292 | ---- solr-4.6.1-orig/scripts/solr 1970-01-01 00:00:00.000000000 +0000 | |
1293 | -+++ solr-4.6.1/scripts/solr 2014-10-28 12:10:45.266945990 +0000 | |
1294 | -@@ -0,0 +1,45 @@ | |
1295 | -+#!/bin/bash | |
1296 | -+# chkconfig: 2345 95 20 | |
1297 | -+# description: Solr | |
1298 | -+# processname: myscript | |
1299 | -+# | |
1300 | -+#----------------------------------------------------- | |
1301 | -+# Script for running solr as a service. | |
1302 | -+# | |
1303 | -+# Usage: service solr {start|stop|restart|status}" | |
1304 | -+# | |
1305 | -+#----------------------------------------------------- | |
1306 | -+# This should be placed in /etc/init.d | |
1307 | -+ | |
1308 | -+. /etc/rc.d/init.d/functions | |
1309 | -+ | |
1310 | -+# Path to pid file | |
1311 | -+PIDFILE=/var/run/solr.pid | |
1312 | -+ | |
1313 | -+# Service name | |
1314 | -+NAME="Solr" | |
1315 | -+ | |
1316 | -+# Service description | |
1317 | -+DESC="start/stop Solr Server" | |
1318 | -+ | |
1319 | -+SOLR_INIT="/usr/share/solr/start.sh" | |
1320 | -+ | |
1321 | -+case $1 in | |
1322 | -+ start) | |
1323 | -+ action "Starting ${NAME}: " daemon --pidfile $PIDFILE $SOLR_INIT | |
1324 | -+ ;; | |
1325 | -+ stop) | |
1326 | -+ action "Stopping ${NAME}: " killproc -p $PIDFILE | |
1327 | -+ ;; | |
1328 | -+ restart) | |
1329 | -+ $0 stop | |
1330 | -+ $0 start | |
1331 | -+ ;; | |
1332 | -+ status) | |
1333 | -+ status -p $PIDFILE solr | |
1334 | -+ ;; | |
1335 | -+ *) | |
1336 | -+ echo "Usage: $0 {start|stop|restart|status}" | |
1337 | -+ exit 3 | |
1338 | -+ ;; | |
1339 | -+esac | |
1340 | -\ No newline at end of file | |
1341 | -diff -uNr solr-4.6.1-orig/start.sh solr-4.6.1/start.sh | |
1342 | ---- solr-4.6.1-orig/start.sh 1970-01-01 00:00:00.000000000 +0000 | |
1343 | -+++ solr-4.6.1/start.sh 2014-10-28 12:11:41.733122551 +0000 | |
1344 | -@@ -0,0 +1,20 @@ | |
1345 | -+#!/bin/bash | |
1346 | -+ | |
1347 | -+# Directory where solr is installed | |
1348 | -+SOLR_HOME=/usr/share/solr/example | |
1349 | -+ | |
1350 | -+# Java options for Solr | |
1351 | -+OPTIONS="-Xmx1024m" | |
1352 | -+ | |
1353 | -+# Path to pid file | |
1354 | -+PIDFILE=/var/run/solr.pid | |
1355 | -+ | |
1356 | -+# Path to log file | |
1357 | -+LOG_FILE=/var/log/solr.log | |
1358 | -+ | |
1359 | -+COMMAND="java $OPTIONS -jar start.jar" | |
1360 | -+ | |
1361 | -+cd $SOLR_HOME | |
1362 | -+nohup $COMMAND > $LOG_FILE 2>&1 & | |
1363 | -+echo $! > $PIDFILE | |
1364 | -+exit $? |
rpm/solr-4.6.1.spec
... | ... | @@ -1,64 +0,0 @@ |
1 | -# | |
2 | -# Spec file do solr | |
3 | -# | |
4 | - | |
5 | -# Preamble | |
6 | - | |
7 | -Summary: Solr is the search platform from Apache Lucene project. | |
8 | -Name: solr | |
9 | -Version: 4.6.1 | |
10 | -Release: 1 | |
11 | - | |
12 | -License: Apache License, Version 2.0 | |
13 | -Group: Applications/Internet | |
14 | -Source: http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz | |
15 | -Patch: solr-4.6.1.patch | |
16 | -URL: http://lucene.apache.org/solr/ | |
17 | -Vendor: The Apache Software Foundation | |
18 | -Requires: java | |
19 | - | |
20 | -%description | |
21 | -SolrTM is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites. | |
22 | - | |
23 | -# Esta seção prepara o ambiente para a construção do pacote. Pode ser | |
24 | -# entendida como um shell script, e é o local onde podem ser aplicados | |
25 | -# os patches | |
26 | -%prep | |
27 | - | |
28 | -# A macro %setup prepara o ambiente, de forma semelhante aos comandos abaixo: | |
29 | -# rm -rf $RPM_BUILD_DIR/cdp-0.33 | |
30 | -# zcat $RPM_SOURCE_DIR/cdp-0.33.tar.gz | tar vxf - | |
31 | -%setup | |
32 | -%patch -p 1 | |
33 | - | |
34 | -# Esta é a seção responsável pela construção do software. Também é um | |
35 | -# shell script, e não tem macros associadas | |
36 | -%build | |
37 | - | |
38 | -# Seção responsável pela instalação do software. Também é um shell script | |
39 | -%install | |
40 | -mkdir -p %{buildroot}/usr/share/solr | |
41 | -cp -r %{_builddir}/solr-4.6.1/* %{buildroot}/usr/share/solr | |
42 | - | |
43 | -mkdir -p %{buildroot}/usr/share/solr/example/solr | |
44 | -cp -r %{_builddir}/solr-4.6.1/example/webapps/solr.war %{buildroot}/usr/share/solr/example/solr/ | |
45 | - | |
46 | -mkdir -p %{buildroot}/etc/init.d | |
47 | -cp -r %{_builddir}/solr-4.6.1/scripts/solr %{buildroot}/etc/init.d/ | |
48 | - | |
49 | -# Esta seção lista todos os arquivos que fazem parte do pacote: se um | |
50 | -# arquivo não for listado abaixo, não será inserido no pacote. A diretiva | |
51 | -# %doc indica um arquivo de documentação | |
52 | -%files | |
53 | -/usr/share/solr | |
54 | -%attr(755, -, -) /etc/init.d/solr | |
55 | - | |
56 | -%post | |
57 | -chkconfig solr on | |
58 | -service solr start | |
59 | -chmod u+x /usr/share/solr/start.sh | |
60 | - | |
61 | -# Esta seção remove os arquivos que foram criados durante o build | |
62 | -%clean | |
63 | -rm -rf %{buildroot} | |
64 | - |
... | ... | @@ -0,0 +1,38 @@ |
1 | +#!/bin/sh | |
2 | + | |
3 | +set -e | |
4 | + | |
5 | +if [ -n "$1" ]; then | |
6 | + http_proxy="$1" | |
7 | +fi | |
8 | + | |
9 | +if [ -z "$http_proxy" ]; then | |
10 | + echo "No http_proxy in command line or environment!" | |
11 | + echo | |
12 | + echo "usage: $0 [HTTP_PROXY]" | |
13 | + exit 1 | |
14 | +fi | |
15 | + | |
16 | +cat > /etc/profile.d/http_proxy.sh<<EOF | |
17 | +export http_proxy='$http_proxy' | |
18 | +export https_proxy='$http_proxy' | |
19 | +export HTTP_PROXY='$http_proxy' | |
20 | +EOF | |
21 | + | |
22 | +if test -f /etc/yum.conf; then | |
23 | + sed -i -e '/proxy=/d; /http_caching=/ d' /etc/yum.conf | |
24 | + sed -i -s '/\[main\]/ a http_caching=packages' /etc/yum.conf | |
25 | + sed -i -s '/\[main\]/ a proxy='$http_proxy /etc/yum.conf | |
26 | + | |
27 | + rm -f /etc/yum/pluginconf.d/fastestmirror.conf | |
28 | + | |
29 | + repofiles=$(grep -rl '^#baseurl' /etc/yum.repos.d) | |
30 | + if [ -n "$repofiles" ]; then | |
31 | + sed -i -e 's/^#baseurl/baseurl/; s/^mirrorlist=/#mirrorlist-/' $repofiles | |
32 | + fi | |
33 | + | |
34 | + if [ ! -f /var/tmp/yum-clean.stamp ]; then | |
35 | + pgrep -f yum || yum clean all || true | |
36 | + touch /var/tmp/yum-clean.stamp | |
37 | + fi | |
38 | +fi | ... | ... |
vagrant/provision.d/00-colab-generic
vagrant/provision.d/10-mailman-debian
... | ... | @@ -1,118 +0,0 @@ |
1 | -#!/bin/sh | |
2 | - | |
3 | -set -e | |
4 | - | |
5 | -export DEBIAN_FRONTEND=noninteractive | |
6 | - | |
7 | -if [ ! -f /etc/apt/sources.list.d/mailman-api.list ]; then | |
8 | - cat > /etc/apt/sources.list.d/mailman-api.list <<EOF | |
9 | -deb http://download.opensuse.org/repositories/isv:/spb:/mailman-api/Debian_7.0/ ./ | |
10 | -deb-src http://download.opensuse.org/repositories/isv:/spb:/mailman-api/Debian_7.0/ ./ | |
11 | -EOF | |
12 | - | |
13 | - apt-key add - <<EOF | |
14 | ------BEGIN PGP PUBLIC KEY BLOCK----- | |
15 | -Version: GnuPG v2.0.15 (GNU/Linux) | |
16 | - | |
17 | -mQENBFRE9cMBCADl9VaZi3A4u5Fy2X9FP/18xkz2U1hsklLTgvwSuFT4gDCgtvD4 | |
18 | -r3xAxnZ/52yLdAnrBratM1uC03WWifrCE+J5rImhiwP3itUzAGi/chmfVAuMBAVN | |
19 | -7rjBpurQoEuMDwec60XmS9XJ+BrcO+MyKaLTxKwy1KN+vaIM8Z7evpFdZghXwbL6 | |
20 | -17ENLRbvqVs7gNtiyLQb26mNMRxTzp7vGFn4Vm2b73GrKvPC4nnUBA5FYZkSclk2 | |
21 | -gpYt/QSZ7qj/YQZmzx31YSSRB8BOPGlsXV2ShWTzvVXfQoZ//ViDgYUlwh5hmaJo | |
22 | -f1gG6MumwJOdcfGlS2BOkddcYpNTveQ4HNQdABEBAAG0MGlzdjpzcGIgT0JTIFBy | |
23 | -b2plY3QgPGlzdjpzcGJAYnVpbGQub3BlbnN1c2Uub3JnPokBPgQTAQIAKAUCVET1 | |
24 | -wwIbAwUJBB6wAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQE7yUxPVcdQmz | |
25 | -yAf/VIWhDdhOnF6XsR/USY57T1gYxFP3H+KchlCfvyFRc3lczZaDVQ57WkYlw7/2 | |
26 | -TN2TpN6JMHPbmltD0QuQg9GSulgp1A5A6R9yWolcZ0QLkSndHcjQciZ4hHcrqO+C | |
27 | -Yb8fCMFJfejJ5FcTEVCBQgnazgI9qRyPAhEFZF3OCgQ1XOoaufojPGoKYoNXBOGI | |
28 | -g2phdVE1glq6ZesKMagoFURGf4pm/Muq5pjK0DbF/iVOM9uVGDWLLpfVMicYiHSF | |
29 | -YbqundUK6MzFlwuLSM0lXYuaaOF6rN3Gq03FVjNE5jbCUxJZAHSYF8KLZ57Opr8R | |
30 | -KVogKh7j5fixFpDoydcPkS0Md4hGBBMRAgAGBQJURPXDAAoJEDswEbdrnWUjeLkA | |
31 | -oKdP1tDhp1FzMFX+MTvEM/HyupveAKCHai4jMDBsjsoVJDobCws7IBLa3g== | |
32 | -=v9lx | |
33 | ------END PGP PUBLIC KEY BLOCK----- | |
34 | -EOF | |
35 | - apt-get update | |
36 | -fi | |
37 | - | |
38 | -# pre-configure packages | |
39 | -'debconf-set-selections' <<EOF | |
40 | -postfix postfix/main_mailer_type select Internet Site | |
41 | - | |
42 | -mailman mailman/site_languages multiselect pt_BR (Brasilian Portuguese) | |
43 | -mailman mailman/default_server_language select pt_BR (Brasilian Portuguese) | |
44 | -EOF | |
45 | - | |
46 | -apt-get install -qy postfix mailman mailman-api | |
47 | - | |
48 | -LISTS_DOMAIN=lists.local | |
49 | -TEST_LISTS='list01 list02 list03' | |
50 | - | |
51 | -################################################################# | |
52 | -# mailman configuration | |
53 | -################################################################# | |
54 | - | |
55 | -mailman_config() { | |
56 | - local key="$1" | |
57 | - local value="$2" | |
58 | - local conffile=/etc/mailman/mm_cfg.py | |
59 | - if grep -q "^$key\s*=" $conffile; then | |
60 | - sed -i -e "s/^$key\s*=.*/$key = $value/" $conffile | |
61 | - else | |
62 | - echo "$key = $value" >> $conffile | |
63 | - fi | |
64 | -} | |
65 | - | |
66 | -mailman_config DEFAULT_EMAIL_HOST "'$LISTS_DOMAIN'" | |
67 | -mailman_config MTA None | |
68 | -mailman_config POSTFIX_STYLE_VIRTUAL_DOMAINS "['$LISTS_DOMAIN']" | |
69 | -mailman_config DEB_LISTMASTER "'vagrant@localhost.localdomain'" | |
70 | - | |
71 | -# create mailman's meta-list | |
72 | -sudo -u list newlist --quiet mailman vagrant@localhost.localdomain "pass-mailman" | |
73 | -service mailman restart | |
74 | - | |
75 | -# create some sample lists | |
76 | -for list in $TEST_LISTS; do | |
77 | - if list_lists --bare | grep "$list"; then | |
78 | - echo "$list already exists ..." | |
79 | - else | |
80 | - sudo -u list newlist --quiet "$list" vagrant@localhost.localdomain "pass-$list" | |
81 | - echo 'vagrant@localhost.localdomain' | add_members -r - "$list" | |
82 | - fi | |
83 | -done | |
84 | - | |
85 | -################################################################# | |
86 | -# mailman-api configuration | |
87 | -################################################################# | |
88 | - | |
89 | -# FIXME binding to 0.0.0.0 is too liberal | |
90 | -cat > /etc/default/mailman-api <<EOF | |
91 | -OPTIONS='--bind=0.0.0.0:8010' | |
92 | -EOF | |
93 | -service mailman-api restart | |
94 | - | |
95 | -if ! grep -q MAILMAN_API_URL /etc/colab/settings.yaml; then | |
96 | - echo "MAILMAN_API_URL: 'http://localhost:8010'" >> /etc/colab/settings.yaml | |
97 | -fi | |
98 | - | |
99 | - | |
100 | -################################################################# | |
101 | -# postfix configuration | |
102 | -################################################################# | |
103 | - | |
104 | -postconf relay_domains="$LISTS_DOMAIN" | |
105 | -postconf transport_maps=hash:/etc/postfix/transport | |
106 | -echo "$LISTS_DOMAIN mailman:" > /etc/postfix/transport | |
107 | -postmap /etc/postfix/transport | |
108 | -service postfix restart | |
109 | - | |
110 | -################################################################# | |
111 | -# post a few message to each list | |
112 | -################################################################# | |
113 | - | |
114 | -for list in $TEST_LISTS; do | |
115 | - for i in $(seq 1 10); do | |
116 | - (echo "this is a test ($i)") | mail -r vagrant@localhost.localdomain -s "test $i" "$list@lists.local" | |
117 | - done | |
118 | -done |
vagrant/provision.sh
... | ... | @@ -1,18 +0,0 @@ |
1 | -#!/bin/sh | |
2 | - | |
3 | -set -e | |
4 | - | |
5 | -if [ -x /usr/bin/apt-get ]; then | |
6 | - os='debian' | |
7 | -fi | |
8 | - | |
9 | -if [ -x /usr/bin/yum ]; then | |
10 | - os='centos' | |
11 | -fi | |
12 | - | |
13 | -for script in $(find /vagrant/vagrant/provision.d -name '*-generic' -or -name "*-$os" | sort); do | |
14 | - ( | |
15 | - set -x | |
16 | - $script | |
17 | - ) | |
18 | -done |