You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Drop PHP 5.5 support. Now only PHP >=5.6 are supported.
7
+
- Drop Symfony 2.7 support. Now only Symfony >=2.8 are supported.
8
+
- Drop Elasticsearch 2.x support. Now only Elasticsearch >=5.0 are supported.
9
+
10
+
## v1.0.2 (2016-10-03)
11
+
- BUGFIX In compiler pass tags are already processed, so it has to be set in the extension. #96
12
+
13
+
## v1.0.1 (2016-10-03)
14
+
- Introduced option to disable router alias. This is because if a user already replaces Symfony router by alias and it conflicts with ONGR alias. #91
15
+
-`DocumentUrlGenerator::support()` function cannot throw exception due to `VersatileGeneratorInterface` interface description. Now it returns false instead. #92
Copy file name to clipboardExpand all lines: README.md
+3-9Lines changed: 3 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,6 @@ ongr_elasticsearch:
72
72
connections:
73
73
default:
74
74
index_name: acme
75
-
analysis:
76
-
analyzer:
77
-
- urlAnalyzer
78
75
managers:
79
76
default:
80
77
connection: default
@@ -95,9 +92,6 @@ ongr_router:
95
92
96
93
In the configuration of the bundle you need to specify the `es.manager` to use and under the `seo_routes` you have to specify documents that will have seo_routes as keys and the controller action that will handle the request as a values.
97
94
98
-
At `_controller` you define controller and action for every document type.
99
-
`_route` is a name of this route and it can be used at path generation.
100
-
101
95
`urlAnalyzer` at `ongr_elasticsearch` configuration defines how all url fields are analyzed by Elasticsearch.
102
96
103
97
If you are using another third party bundle that also has an aliased Symfony router, you may set `disable_alias` to `true`. This
@@ -107,7 +101,7 @@ prevents possible conflicts.
107
101
is set to the chain router. It defaults to -100 in order to be called after the standard Symfony router
108
102
but this value can be changed depending on your projects' need.
109
103
110
-
Check [Elasticsearch bundle mappings docs](https://github.com/ongr-io/ElasticsearchBundle/blob/master/Resources/doc/mapping.md) for more information about the configuration.
104
+
Check [Elasticsearch bundle mappings docs](http://docs.ongr.io/ElasticsearchBundle/mapping) for more information about the configuration.
111
105
112
106
113
107
## Usage example
@@ -133,7 +127,7 @@ class Product implements SeoAwareInterface
133
127
use SeoAwareTrait; // <-TraitforURL's
134
128
135
129
/**
136
-
* @ES\Property(type="string")
130
+
* @ES\Property(type="keyword")
137
131
*/
138
132
public $title;
139
133
@@ -175,7 +169,7 @@ Create an elasticsearch index by running this command in your terminal:
175
169
176
170
```
177
171
178
-
> More info about all commands can be found in the [Elasticsearch bundle commands chapter](https://github.com/ongr-io/ElasticsearchBundle/blob/master/Resources/doc/commands.md).
172
+
> More info about all commands can be found in the [Elasticsearch bundle commands chapter](http://docs.ongr.io/ElasticsearchBundle/commands).
179
173
180
174
Also, run the following curl command in your terminal to insert a product for this demonstration.
Welcome to the RouterBundle, the part of ONGR bundles family, which helps to have pretty urls for every elasticsearch document. We created this bundle with love :heart: and we think you will love it too.
3
+
## URL generation
4
4
5
-
> You can find bundle set up guide in the [`README.md`](../../README.md) file.
6
-
7
-
## How it works
8
-
9
-
### URL generation
10
-
11
-
When your document uses [SeoAwareTrait](https://github.com/ongr-io/RouterBundle/blob/master/Document/SeoAwareTrait.php) you have protected property called `$url`. It contains the url for specific document,which is used for url generation.
5
+
When your document uses [SeoAwareTrait](https://github.com/ongr-io/RouterBundle/blob/master/Document/SeoAwareTrait.php) you have private property called `$url`. It contains the url for specific document,which is used for url generation.
12
6
13
7
Your document must be defined in the configuration of the bundle, under the node `seo_routes`. There you will define the bundle, controller and action that will be called after the router matches the route in your document.
14
8
@@ -27,16 +21,16 @@ In order to generate link to this document (referenced by variable `product`) we
27
21
28
22
> The route `ongr_route_product` is generated from `seo_routes` parameter type name, so it's formed by: `ongr_route_<type-name>`.
29
23
30
-
###URL matching
24
+
## URL matching
31
25
32
-
As shown in [README example](../../README.md#step-4-create-an-action-for-product-page) when url matches document, real object representing document is passed to action instead of original string from URI. This is how it works:
26
+
As shown in [README example](http://docs.ongr.io/RouterBundle) when url matches document, real object representing document is passed to action instead of original string from URI. This is how it works:
33
27
- Symfony chain router begins to parse request.
34
28
- By default there are two routers registered in the chain: standard Symfony router and ONGR router.
35
29
- If Symfony router does not match any routes for given URI it is passed to ONGR router.
36
30
- ONGR router queries ES to get document by URI.
37
31
- If query returned document it is passed to action, if not - NotFound exception is thrown.
38
32
39
-
> Note that it is default behaviour and it can be easily changed by adding and removing routers from chain. [More info](chain_router.md)
33
+
> Note that it is default behaviour and it can be easily changed by adding and removing routers from chain. [More info](http://docs.ongr.io/RouterBundle/chain_router)
40
34
41
35
## Advanced usage
42
-
*[How to add custom router](chain_router.md)
36
+
*[How to add custom router](http://docs.ongr.io/RouterBundle/chain_router)
0 commit comments