Skip to content

Commit 6f2cd6e

Browse files
committed
Merge pull request #32 from ezsystems/test_readme
[Doc] Add info in Readme for running tests
2 parents bcd7da7 + dc40659 commit 6f2cd6e

File tree

2 files changed

+56
-7
lines changed

2 files changed

+56
-7
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ matrix:
55
- php: 5.6
66
env: TEST_CONFIG="phpunit.xml"
77
- php: 5.4
8-
env: TEST_CONFIG="phpunit-integration-legacy-solr.xml" SOLR_VERSION="4.10.4" CORES_SETUP="dedicated" SOLR_CORES="core0 core1 core2 core3" SOLR_CONFS="lib/Resources/config/solr/schema.xml lib/Resources/config/solr/custom-fields-types.xml lib/Resources/config/solr/language-fieldtypes.xml"
8+
env: TEST_CONFIG="phpunit-integration-legacy-solr.xml" SOLR_VERSION="4.10.4" CORES_SETUP="dedicated" SOLR_CONFS="lib/Resources/config/solr/schema.xml lib/Resources/config/solr/custom-fields-types.xml lib/Resources/config/solr/language-fieldtypes.xml" SOLR_CORES="core0 core1 core2 core3"
99
- php: 5.5
10-
env: TEST_CONFIG="phpunit-integration-legacy-solr.xml" SOLR_VERSION="4.10.4" CORES_SETUP="shared" SOLR_CORES="core0 core1 core2 core3" SOLR_CONFS="lib/Resources/config/solr/schema.xml lib/Resources/config/solr/custom-fields-types.xml lib/Resources/config/solr/language-fieldtypes.xml"
10+
env: TEST_CONFIG="phpunit-integration-legacy-solr.xml" SOLR_VERSION="4.10.4" CORES_SETUP="shared" SOLR_CONFS="lib/Resources/config/solr/schema.xml lib/Resources/config/solr/custom-fields-types.xml lib/Resources/config/solr/language-fieldtypes.xml" SOLR_CORES="core0 core1 core2 core3"
1111
- php: 5.6
12-
env: TEST_CONFIG="phpunit-integration-legacy-solr.xml" SOLR_VERSION="4.10.4" CORES_SETUP="single" SOLR_CONFS="lib/Resources/config/solr/schema.xml lib/Resources/config/solr/custom-fields-types.xml lib/Resources/config/solr/language-fieldtypes.xml"
12+
env: TEST_CONFIG="phpunit-integration-legacy-solr.xml" SOLR_VERSION="4.10.4" CORES_SETUP="single" SOLR_CONFS="lib/Resources/config/solr/schema.xml lib/Resources/config/solr/custom-fields-types.xml lib/Resources/config/solr/language-fieldtypes.xml"
1313

1414
# test only master (+ Pull requests)
1515
branches:

README.md

+53-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,68 @@
1-
# Solr Search Engine for eZ Platform
1+
# Solr Search Engine Bundle for eZ Platform
22

33
[![Build Status](https://travis-ci.org/ezsystems/ezplatform-solr-search-engine.svg?branch=master)](https://travis-ci.org/ezsystems/ezplatform-solr-search-engine)
44

55
Solr Search Engine Bundle for use with:
66
- eZ Platform *(bundled out of the box as of 15.07 release)*
77
- eZ Publish Platform 5.4.5 *and higher* *(optional, but recommended for scaling search queries)*
88

9-
Scope for 1.0 version of this bundle is to be able to power close to any kind of queries eZ Publish Platform 5.x users are currently running agains the LegacySearch engine (aka SQL Search/Storage engine), *both* Content and Location Search. This search engine is also taking advantage of Solr's Full text capabilities for language analysis, and it's scalability.
9+
Scope for 1.0 version of this bundle is to be able to power close to any kind of queries eZ Publish Platform 5.x users are currently running agains the LegacySearch engine *(aka SQL Search/Storage engine)*, *both* Content and Location Search. This search engine is also taking advantage of Solr's Full text capabilities for language analysis, and it's scalability.
1010

1111
Version 1.0 is tested and will be supported with _Solr 4.10.4_, support for Solr 5.x will be added in a future update.
1212

13-
Other search features such as Faceting, Highlighting, .., not supported by the SQL search engine is planned for future versions, and will be available by a simple composer update, or sometimes need to also just re index your repository.
13+
Other search features such as Faceting, Highlighting, .., not supported by the SQL search engine is planned for future versions. Some will be available by a simple composer patch update *(0.0.z)*, for major *(x.0.0)* or minor *(0.y.0)* updates there will sometimes be a need to also re index your repository.
1414

1515

16-
### Install
16+
## Install
1717

1818
For how to Install see:
1919
https://doc.ez.no/display/EZP/Solr+Search+Engine+Bundle
20+
21+
22+
23+
### Testing locally
24+
25+
For Contributing to this Bundle, you should make sure to run both unit and integration tests *(from ezpublish-kernel repo)*.
26+
27+
1. Setup this repository locally
28+
29+
```bash
30+
git clone [email protected]:ezsystems/ezplatform-solr-search-engine.git solr
31+
cd solr
32+
composer install
33+
```
34+
35+
At this point you should be able to run unit tests:
36+
```bash
37+
php vendor/bin/phpunit --bootstrap tests/bootstrap.php
38+
```
39+
40+
2. Get & extract [Solr 4.10.4](http://archive.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.tgz)
41+
42+
3. Configure Solr *(single core)*
43+
44+
*Note: See .travis.yml and bin/.travis/init_solr.sh for multi core setups*
45+
46+
```bash
47+
cp -R lib/Resources/config/solr/* solr-4.10.4/example/solr/collection1/conf
48+
```
49+
50+
4. Start Solr
51+
52+
*Note: In this case in seperate terminal for debug use*
53+
54+
```bash
55+
cd solr-4.10.4/example
56+
java -Djetty.port=8983 -jar start.jar
57+
```
58+
59+
5. Run integration tests
60+
61+
```bash
62+
export CORES_SETUP="single"
63+
php -d memory_limit=-1 vendor/bin/phpunit --bootstrap tests/bootstrap.php -vc vendor/ezsystems/ezpublish-kernel/phpunit-integration-legacy-solr.xml
64+
```
65+
66+
## Copyright & license
67+
68+
Copyright eZ Systems AS, for copyright and license details see provided LICENSE file.

0 commit comments

Comments
 (0)