Skip to content

Commit 225151a

Browse files
author
Markus Kalkbrenner
committed
fixes #672 gettings started documentation
1 parent bdb78b9 commit 225151a

File tree

3 files changed

+54
-8
lines changed

3 files changed

+54
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to the solarium library will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [5.0.1]
8+
### Fixed
9+
- Getting started documentation
10+
11+
712
## [5.0.0]
813
### Added
914
- Component\Result\Facet\Bucket::getFacetSet()

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,45 @@ Solarium is a PHP Solr client library that accurately model Solr concepts. Where
77
the communication with Solr, Solarium also relieves you of handling all the complex Solr query parameters using a
88
well documented API.
99

10-
Please see the docs for a more detailed description.
10+
Please see the [docs](http://solarium.readthedocs.io/en/stable/) for a more detailed description.
1111

1212
## Requirements
1313

14-
Solarium only supports PHP 7.1 and up.
14+
Solarium 5.x only supports PHP 7.1 and up.
1515

1616
It's highly recommended to have Curl enabled in your PHP environment. However if you don't have Curl available you can
1717
switch from using Curl (the default) to another client adapter. The other adapters don't support all the features of the
1818
Curl adapter.
1919

2020
## Getting started
2121

22-
The preferred way to install Solarium is by using Composer. Solarium is available on Packagist.
22+
The preferred way to install Solarium is by using Composer. Solarium is available on
23+
[Packagist](https://packagist.org/packages/solarium/solarium).
2324

2425
Example:
2526
```
2627
composer require solarium/solarium
2728
```
2829

30+
### Pitfall when upgrading from earlier versions to 5.x
31+
32+
In the past, the V1 API endpoint **_solr_** was not added automatically, so most users set it as path on the endpoint.
33+
This bug was discovered with the addition of V2 API support. In almost every setup, the path has to be set to `/`
34+
instead of `/solr` with this release!
35+
36+
For the same reason it is a must to explicit configure the _core_ or _collection_.
37+
38+
So an old setting like
39+
```
40+
'path' => '/solr/xxxx/'
41+
```
42+
has to be changed to something like
43+
```
44+
'path' => '/',
45+
'collection' => 'xxxx',
46+
```
47+
48+
2949
## Run the examples
3050

3151
This needs a git checkout using composer.

docs/getting-started.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Installation
99

1010
### Requirements
1111

12-
For installing Solarium a minimal PHP version 5.3 is required. While previous Solarium versions with any PHP5 version, Solarium 3 uses interfaces so 5.3+ is a hard requirement.
12+
For installing Solarium a minimal PHP version 7.1 is required.
1313

14-
There is no Solr version requirement. Solr versions 1.4 and upwards have been tested with Solarium. Ofcourse, if you want to use version specific features like spatial search you need the right Solr version. For spatial search you will need at least 3.1.
14+
There is no Solr version requirement. But it's highly recommended that you use at least 6.6.6.
1515

1616
### Getting Solarium
1717

@@ -28,7 +28,7 @@ See [<https://packagist.org>](https://packagist.org) for other packages.
2828
```json
2929
{
3030
"require": {
31-
"solarium/solarium": "3.6.0"
31+
"solarium/solarium": "~5.0.0"
3232
}
3333
}
3434
```
@@ -75,6 +75,25 @@ htmlFooter();
7575

7676
```
7777

78+
### Pitfall when upgrading from earlier versions to 5.x
79+
80+
In the past, the V1 API endpoint **_solr_** was not added automatically, so most users set it as path on the endpoint.
81+
This bug was discovered with the addition of V2 API support. In almost every setup, the path has to be set to `/`
82+
instead of `/solr` with this release!
83+
84+
For the same reason it is a must to explicit configure the _core_ or _collection_.
85+
86+
So an old setting like
87+
```
88+
'path' => '/solr/xxxx/'
89+
```
90+
has to be changed to something like
91+
```
92+
'path' => '/',
93+
'collection' => 'xxxx',
94+
```
95+
96+
7897
### Available integrations
7998

8099
Some users of Solarium have been nice enough to create easy ways of integrating Solarium:
@@ -105,11 +124,13 @@ $config = array(
105124
'localhost' => array(
106125
'host' => '127.0.0.1',
107126
'port' => 8983,
108-
'path' => '/solr/',
127+
'path' => '/',
128+
'core' => 'techproducts',
129+
// For Solr Cloud you need to provide a collection instead of core:
130+
// 'collection' => 'techproducts',
109131
)
110132
)
111133
);
112-
113134
```
114135

115136
### Selecting documents

0 commit comments

Comments
 (0)