Skip to content

Commit 608379b

Browse files
dimaipkdambekalns
authored andcommitted
TASK: Improve the documentation
1 parent 3667988 commit 608379b

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ be fetched and passed to your template.
356356

357357
**Important notice**
358358

359-
If you do use the terms filter be aware of Elasticsearchs analyze functionality. You might want to disable this for all
360-
your filterable properties like this:
359+
If you do use the terms filter be aware of Elasticsearchs analyze functionality for strings. You might want to disable this
360+
for all your filterable properties, or else filtering won't work on them properly:
361361
```
362362
'Vendor.Name:Product'
363363
properties:
@@ -529,7 +529,7 @@ suggestions = ${Search.query(site)...suggestions('my_suggestions', this.suggesti
529529

530530
## Advanced: Configuration of Indexing
531531

532-
**Normally, this does not need to be touched, as this package supports all Neos data types natively.**
532+
**The default configuration supports most usecases and often may not need to be touched, as this package comes with sane defaults for all Neos data types**
533533

534534
Indexing of properties is configured at two places. The defaults per-data-type are configured
535535
inside `TYPO3.TYPO3CR.Search.defaultConfigurationPerType` of `Settings.yaml`.
@@ -575,6 +575,8 @@ TYPO3:
575575
indexing: '${(node.hiddenBeforeDateTime ? Date.format(node.hiddenBeforeDateTime, "Y-m-d\TH:i:sP") : null)}'
576576
```
577577

578+
If your nodetypes schema defines custom properties of type DateTime, you have got to provide similar configuration for them as well in your NodeTypes.yaml, or else they will not be indexed correctly.
579+
578580
There are a few indexing helpers inside the `Indexing` namespace which are usable inside the
579581
`indexing` expression. In most cases, you don't need to touch this, but they were needed to build up
580582
the standard indexing configuration:
@@ -647,6 +649,12 @@ currently configured in PHP, the configuration for any property in a node which
647649
This is important so that Date- and Time-based searches work as expected, both when using formatted DateTime strings and
648650
when using relative DateTime calculations (eg.: `now`, `now+1d`).
649651

652+
If you want to filter items by date, e.g. to show items with date later than today, you can create a query like this:
653+
654+
```
655+
${...greaterThan('date', Date.format(Date.Now(), "Y-m-d\TH:i:sP"))...}
656+
```
657+
650658
For more information on Elasticsearch's Date Formats,
651659
[click here](http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html).
652660

0 commit comments

Comments
 (0)