Skip to content

Commit

Permalink
Merge pull request ezsystems#155 from ezsystems/5.3-beta1fixes
Browse files Browse the repository at this point in the history
5.3 beta1fixes
  • Loading branch information
andrerom committed May 2, 2014
2 parents 26a54d0 + 026b6a2 commit 03b17e0
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 61 deletions.
22 changes: 0 additions & 22 deletions README.multicore.txt

This file was deleted.

12 changes: 6 additions & 6 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Requirements:

Installing:
-----------
1. Extract the ezfind extension and place it in the extensions folder.
1. Extract the ezfind extension and place it in the ezpublish_legacy/extensions folder.
2. Run it:
1. For small sites: use a regular java 1.7 JRE from Sun

1. For small sites: use a regular java 1.7 JRE from Oracle
Start the Java based search engine (based on Solr).
Enter `extension/ezfind/java` and start the Solr engine with the command:

Expand All @@ -20,16 +21,15 @@ Installing:
```
(See configuration for more details)
Make sure that the user running the java application has write access to
`extension/ezfind/java/solr/data` and `extension/ezfind/java/logs` .
2. For high performance, larger sites, use a 64 bit OS and 64 bit Java VM from Sun (1.5 recommended)
`extension/ezfind/java/solr/` and `extension/ezfind/java/logs` .
2. For high performance, larger sites, use a 64 bit OS and 64 bit Java VM from Oracle (1.7 recommended)
you need to use some extra parameters for java too, the following is recommended for typical sites:

```bash
$ java -server -d64 -Xmx1500m -Xms1500m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:NewRatio=5 -jar start.jar
```
This will: make sure the Java VM is started with 64 bit mode,
allocate a heap space of 1500MB which is used for Solr caches and objects,
the rest of the options are related to garbage collection

3. Enable the extension in eZ Publish. Do this by opening settings/override/site.ini.append.php ,
and add in the `[ExtensionSettings]` block:

Expand Down
Binary file removed doc/ezfind_2.0_manual.odt
Binary file not shown.
Binary file removed doc/ezfind_2.0_manual.pdf
Binary file not shown.
70 changes: 40 additions & 30 deletions doc/multicore-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,72 @@
eZ find & Solr multicore how-to
===============================

eZ find 2.2 introduces support for solr multicore feature. This finally allows
for better language specific search & analysis.
Since eZ Find 5.3 (which upgrades Solr to 4.7), running Solr in multicore mode
is the default

Starting solr multicore
=======================
A default configuration of solr multicore is shipped with ezfind.

To start it, use the following command line instead of the default one::
$java/: java -Dsolr.solr.home=solr.multicore -jar start.jar

Configuring solr for multicore
==============================
You will find in extension/ezfind/java a folder named solr.multicore. This is
a distinct solr home that already provides multicore features.
To start it, use the regular command line
$java/: java -jar start.jar

Since eZ Find 5.3, the directory solr.multicore does not exist anymore!

Configuring solr additional cores
=================================

You will find in extension/ezfind/java a folder named solr.languages. This
directory contains language specific schema configurations.


solr.xml
--------
Located in the solr.multicore folder mentionned above, this file is required to
enable multicore.


The <cores> element is used to configure the administration URL for the cores,
as well as the list of available cores. Each 'core' sub-element configures a
new core. The 'name' attribute determines what URL element is used to access
this core, while the instanceDir attribute determines the subfolder of
solr.multicore where this core configuration can be found.
solr where this core configuration can be found.

Creating a new core
-------------------
Note that even though only language specific cores are used by eZ find at the
moment, cores can be used for much more than that.

1) you need to copy one of the existing ones, for example
extension/ezfind/java/solr.multicore/eng-GB to a new name, the easiest being
the target locale name::
1) you need to create a new directory under java/solr and then copy the default
configuration, extension/ezfind/java/solr/ezp-default/conf to this new
directory, typically the target locale name::

$ cd extension/ezfind/java/solr
$ mkdir <new-core>
$ cp -rp ezp-default/conf <new-core>

Finally you should copy the appropriate files from
extension/ezfind/java/solr.languages

For example, for a french language core:

$ cp ../solr.languages/fr/* <new-core>/conf

2) Make sure Solr knows about the new core

This can be done in two ways: edit the solr.xml file manually

$ezroot: cd extension/ezfind/java/solr.multicore
$solr.multicore: cp -rp eng-GB nor-NO
2a) edit solr/solr.xml and add the newly created core here::

2) edit solr.multicore/solr.xml and add the newly created core here::
<core name="<new-core>" instanceDir="<new-core>" />

<core name="eng-GB" instanceDir="eng-GB" />
<core name="nor-NO" instanceDir="nor-NO" />
Then restart Solr

3) now, you must configure the core so that it actually knows what language
it will handle, and will perform language specific analysis. To do so, edit
the conf/schema.xml file located in this particular core::
2b) go the the Solr admin interface

extension/ezfind/java/solr.multicore/nor-NO/conf/schema.xml
Select the "Core Admin"
Click "Add new core" and fill in the directory and name of the new core

In this file, you will find multiple occurences of 'English' (if you've used
eng-GB as the source). All of these will be attributes of a 'filter' XML element.
Edit these, and replace 'English' with your language. The list of supported
languages can be found on solr's wiki:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SnowballPorterFilterFactory
You do not need to restart Solr, the core is added and ready to use

For nor-NO, you would use 'Norwegian'.

Tips
====
Expand Down
2 changes: 1 addition & 1 deletion java/solr.languages/en/language-specific-fieldtypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="lang/stopwords_en.txt"
words="stopwords_en.txt"
/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
Expand Down
15 changes: 15 additions & 0 deletions java/solr.languages/fr/contractions_fr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Set of French contractions for ElisionFilter
# TODO: load this as a resource from the analyzer and sync it in build.xml
l
m
t
qu
n
s
j
d
c
jusqu
quoiqu
lorsqu
puisqu
2 changes: 1 addition & 1 deletion java/solr.languages/fr/language-specific-fieldtypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<!-- removes l', etc -->
<filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/>
<filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="contractions_fr.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_fr.txt" format="snowball" />
<filter class="solr.FrenchLightStemFilterFactory"/>
Expand Down
2 changes: 1 addition & 1 deletion java/solr/ezp-default/conf/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@
-->
<!-- </requestHandler> -->

<requestHandler name="ezpublish" class="solr.SearchHandler" >
<requestHandler name="ezpublish" class="solr.SearchHandler" default="true" >
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="defType">edismax</str>
Expand Down

0 comments on commit 03b17e0

Please sign in to comment.