Skip to content

Commit 2868afc

Browse files
committed
Released version 3.5.13 for archive.
1 parent 39aa2da commit 2868afc

File tree

4 files changed

+53
-18
lines changed

4 files changed

+53
-18
lines changed

Module.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,27 @@ public function install(ServiceLocatorInterface $serviceLocator)
9292
{
9393
$this->setServiceLocator($serviceLocator);
9494
$connection = $serviceLocator->get('Omeka\Connection');
95+
$translator = $serviceLocator->get('MvcTranslator');
96+
$messenger = new Messenger;
97+
98+
$message = new Message(sprintf(
99+
$translator->translate('This module is deprecated and will not receive new improvements any more. The module %1$sSearchSolr%2$s replaces it.'), // @translate
100+
'<a href="https://github.com/Daniel-KM/Omeka-S-module-SearchSolr" target="_blank">', '</a>'
101+
));
102+
$message->setEscapeHtml(false);
103+
$messenger->addWarning($message);
95104

96105
if (!extension_loaded('solr')) {
97-
$translator = $serviceLocator->get('MvcTranslator');
98106
$message = $translator->translate('Solr module requires PHP Solr extension, which is not loaded.');
99107
throw new ModuleCannotInstallException($message);
100108
}
101109

102110
if (!class_exists('SolrDisMaxQuery')) {
103-
$translator = $serviceLocator->get('MvcTranslator');
104111
$solrVersion = class_exists('SolrUtils') ? \SolrUtils::getSolrVersion() : $translator->translate('[unknown]');
105112
$message = new Message(
106113
$translator->translate('To use advanced query options (and/or, distance max, etc.), Solr module requires PHP Solr library 2.1.0 or above (lastest recommended, current %s).'),
107114
$solrVersion
108115
);
109-
$messenger = new Messenger();
110116
$messenger->addWarning($message);
111117
}
112118

README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
Solr (module for Omeka S)
1+
Solr (module for Omeka S) [archived]
22
=========================
33

44
[![Build Status](https://travis-ci.org/biblibre/omeka-s-module-Solr.svg?branch=master)](https://travis-ci.org/biblibre/omeka-s-module-Solr)
55

66
[Solr] is a module for [Omeka S] that provides a [Search] adapter for [Apache Solr].
77

8+
**IMPORTANT**
9+
This fork of the module [Solr of BibLibre] is deprecated and replaced by the
10+
module [Search adapter for Solr] in order to manage improvements.
11+
812

913
Installation
1014
------------
@@ -44,7 +48,7 @@ Quick start
4448
3. This default node can be customized if needed, for example to force the
4549
queries to be a "OR" query (default) or a "AND" query (more common).
4650
3. In Search admin
47-
1 . Create an index
51+
1. Create an index
4852
1. Add a new index with name `Default` or whatever you want, using the
4953
Solr adapter and the `default` node.
5054
2. Launch the indexation by clicking on the "reindex" button (two arrows
@@ -109,15 +113,15 @@ it via `dpkg`. The process is the same for Red Hat and derivatives.
109113
The module works with Solr 5.5.5 (Java [1.7 u55]) and Solr 6.6.6 (Java [1.8]), but
110114
not Solr 7.2.1 (indexing works, not the search).
111115

112-
```bash
116+
```sh
113117
cd /opt
114118
# Check if java is installed with the good version.
115119
java -version
116120
# If not installed, install it (uncomment)
117121
#sudo apt install default-jre
118-
# The certificate is currently obsolete on Apache server, so don’t check it.
122+
# If the certificate is obsolete on Apache server, add --no-check-certificate.
119123
# To install another version, just change all next version numbers below.
120-
wget --no-check-certificate https://www.eu.apache.org/dist/lucene/solr/6.6.6/solr-6.6.6.tgz
124+
wget https://archive.apache.org/dist/lucene/solr/6.6.6/solr-6.6.6.tgz
121125
# Extract the install script
122126
tar zxvf solr-6.6.6.tgz solr-6.6.6/bin/install_solr_service.sh --strip-components=2
123127
# Launch the install script (by default, Solr is installed in /opt; check other options if needed)
@@ -133,12 +137,19 @@ rm install_solr_service.sh
133137

134138
Solr may be managed as a system service:
135139

136-
```bash
140+
```sh
137141
sudo systemctl status solr
138142
sudo systemctl stop solr
139143
sudo systemctl start solr
140144
```
141145

146+
The result may be more complete with direct command:
147+
```sh
148+
sudo su - solr -c "/opt/solr/bin/solr status"
149+
sudo su - solr -c "/opt/solr/bin/solr stop"
150+
sudo su - solr -c "/opt/solr/bin/solr start"
151+
```
152+
142153
Solr is automatically launched and available in your browser at [http://localhost:8983].
143154

144155
Solr is available via command line too at `/opt/solr/bin/solr`.
@@ -210,11 +221,11 @@ search engine to add such a protection.
210221
Before upgrade, you should backup the folder `/var/solr` if you want to upgrade
211222
a previous config:
212223

213-
```bash
224+
```sh
214225
cd /opt
215226
java -version
216227
#sudo apt install default-jre
217-
wget --no-check-certificate https://www.eu.apache.org/dist/lucene/solr/6.6.6/solr-6.6.6.tgz
228+
wget https://archive.apache.org/dist/lucene/solr/6.6.6/solr-6.6.6.tgz
218229
tar zxvf solr-6.6.6.tgz solr-6.6.6/bin/install_solr_service.sh --strip-components=2
219230
# The "-f" means "upgrade". The symlink /opt/solr is automatically updated.
220231
sudo bash ./install_solr_service.sh solr-6.6.6.tgz -f
@@ -229,7 +240,7 @@ When Solr is installed manually, there is no automatic uninstallation process.
229240
The next commands are dangerous, so check the commands above twice before
230241
executing, in particular don’t add whitespace after the slashs "/".
231242

232-
```bash
243+
```sh
233244
sudo systemctl stop solr
234245
sudo update-rc.d -f solr remove
235246
sudo rm /etc/init.d/solr
@@ -255,7 +266,7 @@ At least one index ("node", "collection" or "core") should be created in Solr
255266
to be used with Omeka. The simpler is to create one via the command line to
256267
avoid permissions issues.
257268

258-
```
269+
```sh
259270
sudo su - solr -c "/opt/solr/bin/solr create -c omeka -n data_driven_schema_configs"
260271
```
261272

@@ -274,7 +285,8 @@ The config files are saved in `/var/solr/data` by default.
274285
If you choose a data driven schema, you can remove it and create a new one with
275286
the same name.
276287

277-
```
288+
```sh
289+
# Warning: These commands are used for data driven indexation. Else, backup your config first.
278290
sudo su - solr -c "/opt/solr/bin/solr delete -c omeka"
279291
sudo su - solr -c "/opt/solr/bin/solr create -c omeka -n data_driven_schema_configs"
280292
```
@@ -354,9 +366,11 @@ See commits for full list of contributors.
354366

355367

356368
[Solr]: https://github.com/BibLibre/Omeka-S-module-Solr
369+
[Search adapter for Solr]: https://github.com/Daniel-KM/Omeka-S-module-SearchSolr
357370
[Omeka S]: https://omeka.org/s
358-
[Search]: https://github.com/biblibre/omeka-s-module-Search
371+
[Search]: https://github.com/Daniel-KM/omeka-s-module-Search
359372
[Apache Solr]: https://lucene.apache.org/solr/
373+
[Solr of BibLibre]: https://github.com/biblibre/omeka-s-module-Solr
360374
[Solr module]: https://github.com/biblibre/omeka-s-module-Solr
361375
[Installing a module]: http://dev.omeka.org/docs/s/user-manual/modules/#installing-modules
362376
[documentation]: https://lucene.apache.org/solr/guide/7_5/the-dismax-query-parser.html#q-alt-parameter

config/module.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[info]
2-
name = "Search adapter for Solr"
2+
name = "Search Solr (archived)"
33
description = "Search Omeka resources instantly and deeply with Lucene / Solr"
44
tags = "Solr, Lucene, search, facet, filter, indexation, autocompletion"
55
license = "CECILL-2.1"
6-
author = "BibLibre, improved by Daniel Berthereau"
6+
author = "Daniel Berthereau (forked from module Solr of BibLibre)"
77
author_link = "https://github.com/biblibre"
88
module_link = "https://github.com/biblibre/omeka-s-module-Solr"
99
support_link = "https://github.com/biblibre/omeka-s-module-Solr/issues"
1010
configurable = false
11-
version = "3.5.12"
11+
version = "3.5.13"
1212
omeka_version_constraint = "^1.2.0 || ^2.0.0"

data/scripts/upgrade.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,18 @@
238238
}
239239
}
240240
}
241+
242+
if (version_compare($oldVersion, '3.5.14', '<=')) {
243+
$translator = $serviceLocator->get('MvcTranslator');
244+
$messenger = new \Omeka\Mvc\Controller\Plugin\Messenger;
245+
$message = new \Omeka\Stdlib\Message(sprintf(
246+
$translator->translate('This module is deprecated and will not receive new improvements any more. The module %1$sSearchSolr%2$s replaces it.'), // @translate
247+
'<a href="https://github.com/Daniel-KM/Omeka-S-module-SearchSolr" target="_blank">', '</a>'
248+
));
249+
$message->setEscapeHtml(false);
250+
$messenger->addWarning($message);
251+
$message = new \Omeka\Stdlib\Message(
252+
$translator->translate('The upgrade from fhis old module to the new one is automatic.') // @translate
253+
);
254+
$messenger->addWarning($message);
255+
}

0 commit comments

Comments
 (0)