Skip to content

Commit 9df72cc

Browse files
committed
TASK: Tweak documentation
1 parent 0c3ddf2 commit 9df72cc

2 files changed

Lines changed: 49 additions & 51 deletions

File tree

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
# Needed Configuration in configuration.yml for Elasticsearch 5.x
22

3-
No special configuration is needed for Elasticsearch 5.x. Nice, isn't it?
3+
No special configuration is needed for Elasticsearch 5.x.
44

5-
But the following can make your life easier:
6-
7-
```
8-
# the following settings secure your cluster
9-
cluster.name: [PUT_YOUR_CUSTOM_NAME_HERE]
10-
node.name: [PUT_YOUR_CUSTOM_NAME_HERE]
11-
network.host: _local_
12-
```
13-
14-
**Note:** When using Elasticsearch 5.x changes to the mapping may be needed.
15-
More information on the [mapping in ElasticSearch 5.x](ElasticMapping-5.x.md).
5+
**Note:** Compared to what you may know from earlier versions of Elasticsearch,
6+
changes to the types may need to be done in your mapping for version 5. More
7+
information on the [mapping in ElasticSearch 5.x](ElasticMapping-5.x.md).

README.md

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,30 @@ Finally, run `./flow nodeindex:build`, and add the search plugin to your page. I
2929

3030
## Elastic version support
3131

32-
**HINT: the Master of this package only supports modern versions of ES. If you need ES 1.x or 2.x support, please [see the 4.x branch of this repository](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/tree/4.0#elastic-version-support).**
32+
**HINT: this package only supports modern versions of Elasticsearch. If you need 1.x or 2.x support, please [see the 4.x branch of this repository](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/tree/4.0#elastic-version-support).**
3333

34-
You can switch the Elastic driver by editing ```Settings.yaml```
35-
(```Flowpack.ElasticSearch.ContentRepositoryAdaptor.driver.version```) with the following value:
34+
You can switch the Elasticsearch driver by editing `Settings.yaml`
35+
(`Flowpack.ElasticSearch.ContentRepositoryAdaptor.driver.version`) with the following value:
3636

37-
* ```5.x``` to support Elastic 5.x
37+
* `5.x` to support Elasticsearch 5.x
3838

3939
_Currently the Driver interfaces are not marked as API, and can be changed to adapt to future needs._
4040

41-
**Note:** When using Elasticsearch 5.x changes to the types may need to be done in your mapping.
42-
More information on the [mapping in ElasticSearch 5.x](Documentation/ElasticMapping-5.x.md).
43-
4441
### Elasticsearch Configuration file elasticsearch.yml
4542

46-
There is a need, depending on your version of Elasticsearch, to add specific configuration to your
47-
Elasticsearch Configuration File `<your-elasticsearch>/config/elasticsearch.yml`.
43+
The following general configuration advice can make your life easier:
44+
45+
```yaml
46+
# the following settings secure your cluster
47+
cluster.name: [PUT_YOUR_CUSTOM_NAME_HERE]
48+
node.name: [PUT_YOUR_CUSTOM_NAME_HERE]
49+
network.host: _local_
50+
```
4851
49-
- [ElasticSearch 5.x](Documentation/ElasticConfiguration-5.x.md)
52+
There may be a need, to add specific configuration to your Elasticsearch Configuration File
53+
`<your-elasticsearch>/config/elasticsearch.yml`, , depending on your version of Elasticsearch.
54+
55+
- [Elasticsearch 5.x](Documentation/ElasticConfiguration-5.x.md)
5056

5157
## Building up the Index
5258

@@ -311,7 +317,7 @@ be fetched and passed to your template.
311317

312318
If you do use the terms filter be aware of Elasticsearchs analyze functionality for strings. You might want to disable this
313319
for all your filterable properties, or else filtering won't work on them properly:
314-
```
320+
```yaml
315321
'Vendor.Name:Product'
316322
properties:
317323
color:
@@ -370,7 +376,7 @@ This is how a more complex example could look like. Imagine you a want to render
370376
node you want to display the distance to a specific point.
371377

372378
First of all you have to define a property in your NodeTypes.yaml for your node where to store lat/lon information's:
373-
```
379+
```yaml
374380
'Vendor.Name:Retailer':
375381
properties:
376382
'latlng':
@@ -492,24 +498,24 @@ suggestions = ${Search.query(site)...suggestions('my_suggestions', this.suggesti
492498
493499
In order to set the maximum cache time of a fusion prototype that renders nodes fetched by `Search()`,
494500
the nearest future value of the hiddenBeforeDateTime or hiddenAfterDateTime properties of all nodes in the result needs to be calculated.
501+
```
502+
prototype(Acme.Blog:Listing) < prototype(Neos.Fusion:Collection) {
503+
@context.searchQuery = ${Search.query(site).nodeType('Acme.Blog:Post')}
495504

496-
prototype(Acme.Blog:Listing) < prototype(Neos.Fusion:Collection) {
497-
@context.searchQuery = ${Search.query(site).nodeType('Acme.Blog:Post')}
498-
499-
collection = ${searchQuery.execute()}
500-
itemName = 'node'
501-
itemRenderer = Acme.Blog:Post
502-
503-
@cache {
504-
mode = 'cached'
505-
maximumLifetime = ${searchQuery.cacheLifetime()}
506-
507-
entryTags {
508-
map = ${'NodeType_Acme.Blog:Post'}
509-
}
510-
}
511-
}
512-
505+
collection = ${searchQuery.execute()}
506+
itemName = 'node'
507+
itemRenderer = Acme.Blog:Post
508+
509+
@cache {
510+
mode = 'cached'
511+
maximumLifetime = ${searchQuery.cacheLifetime()}
512+
513+
entryTags {
514+
map = ${'NodeType_Acme.Blog:Post'}
515+
}
516+
}
517+
}
518+
```
513519
514520
## Advanced: Configuration of Indexing
515521
@@ -531,7 +537,7 @@ This configuration contains two parts:
531537
specified. It has access to the current `value` and the current `node`.
532538
533539
Example (from the default configuration):
534-
```
540+
```yaml
535541
# Settings.yaml
536542
Neos:
537543
ContentRepository:
@@ -545,7 +551,7 @@ Neos:
545551
indexing: '${value}'
546552
```
547553

548-
```
554+
```yaml
549555
# NodeTypes.yaml
550556
'Neos.Neos:Timable':
551557
properties:
@@ -581,7 +587,7 @@ the standard indexing configuration:
581587
In order to enable fulltext indexing, every `Document` node must be configured as *fulltext root*. Thus,
582588
the following is configured in the default configuration:
583589

584-
```
590+
```yaml
585591
'Neos.Neos:Document':
586592
search:
587593
fulltext:
@@ -596,7 +602,7 @@ in `NodeTypes.yaml` at `properties.[propertyName].search.fulltextExtractor`.
596602

597603
An example:
598604

599-
```
605+
```yaml
600606
'Neos.Neos.NodeTypes:Text':
601607
properties:
602608
'text':
@@ -621,7 +627,7 @@ An example:
621627
As a default, Elasticsearch indexes dates in the UTC Timezone. In order to have it index using the timezone
622628
currently configured in PHP, the configuration for any property in a node which represents a date should look like this:
623629

624-
```
630+
```yaml
625631
'My.Blog:Post':
626632
properties:
627633
date:
@@ -650,7 +656,7 @@ For more information on Elasticsearch's Date Formats,
650656
If you want to index attachments, you need to install the [Elasticsearch Attachment Plugin](https://github.com/elastic/elasticsearch-mapper-attachments).
651657
Then, you can add the following to your `Settings.yaml`:
652658

653-
```
659+
```yaml
654660
Neos:
655661
ContentRepository:
656662
Search:
@@ -674,7 +680,7 @@ If you want to fine-tune the indexing and mapping on a more detailed level, you
674680

675681
First, configure the index settings as you need them, e.g. configuring analyzers:
676682

677-
```
683+
```yaml
678684
Flowpack:
679685
ElasticSearch:
680686
indexes:
@@ -697,7 +703,7 @@ Flowpack:
697703
Then, you can change the analyzers on a per-field level; or e.g. reconfigure the _all field with the following snippet
698704
in the NodeTypes.yaml. Generally this works by defining the global mapping at `[nodeType].search.elasticSearchMapping`:
699705

700-
```
706+
```yaml
701707
'Neos.Neos:Node':
702708
search:
703709
elasticSearchMapping:
@@ -719,7 +725,7 @@ If you need to run serveral (different) neos instances on the same elasticsearch
719725

720726
So `./flow nodeindex:build` or `./flow nodeindex:cleanup` won't overwrite your other sites index.
721727

722-
```
728+
```yaml
723729
Neos:
724730
ContentRepository:
725731
Search:
@@ -755,4 +761,4 @@ In order to understand what's going on, the following commands are helpful:
755761
3. Replace `ElasticSeach.fulltext` by `Indexing`
756762
4. Search for `ElasticSearch.` (inside the `indexing` expressions) and replace them by `Indexing.`
757763

758-
Created by Sebastian Kurfürst; [contributions by Karsten Dambekalns, Robert Lemke and others](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/graphs/contributors).
764+
Created by [Sebastian Kurfürst; contributions by Karsten Dambekalns, Robert Lemke and others](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/graphs/contributors).

0 commit comments

Comments
 (0)