installation_solr.md.vm
2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#set($h1 = '#')
#set($h2 = '##')
#set($h3 = '###')
#set($h4 = '####')
$h1 Mtas and Solr
Mtas can be used as plugin for Apache Solr
Prerequisites
- Installed [Apache Solr](http://lucene.apache.org/solr/)
- Currently supported and advised version is ${currentDevelopmentVersion}
Start with a new Solr core.
$h3 Libraries
Add the `mtas-${currentDevelopmentVersion}.jar` to the `lib` directory of the new Solr core.
A prebuilt `mtas-${currentDevelopmentVersion}.jar` is available from the [download](download.html) page.
Furthermore, add the [Apache Commons Mathematics Library](http://commons.apache.org/proper/commons-math/) to the `lib` directory of the new Solr core.
$h3 Solrconfig.xml
Some changes have to be made within the `solrconfig.xml` file, elements have to be added to the `<config/>` or existing elements have te be adjusted:
Define a new **mtas searchComponent**:
```console
<searchComponent name="mtas" class="mtas.solr.handler.component.MtasSolrSearchComponent"/>
```
Add this component to the select requestHandler by inserting the following within the
`<requestHandler/>` with name `"/select"`:
``` console
<arr name="last-components">
<str>mtas</str>
</arr>
```
Define a new **mtas_cql queryParser**:
```console
<queryParser name="mtas_cql" class="mtas.solr.search.MtasSolrCQLQParserPlugin"/>
```
Define a new **mtas requestHandler**:
```console
<requestHandler name="/mtas" class="mtas.solr.handler.MtasRequestHandler" />
```
Define a new updateRequestProcessorChain:
```console
<updateRequestProcessorChain name="mtasUpdateProcessor">
<processor class="mtas.solr.update.processor.MtasUpdateRequestProcessorFactory" />
<processor class="solr.LogUpdateProcessorFactory" />
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>
```
Define or adjust the update requestHandler with this updateRequestProcessorChain:
```console
<requestHandler name="/update" class="solr.UpdateRequestHandler">
<lst name="defaults">
<str name="update.chain">mtasUpdateProcessor</str>
</lst>
</requestHandler>
```
Finally, in this instruction we will use a classic schema instead of the managed-schema. Therefore define the correct schemaFactory.
```console
<schemaFactory class="ClassicIndexSchemaFactory"/>
```