@@ -36,7 +36,7 @@ alternative to FlowQuery. In the long run, we might be able to integrate this AP
3636but for now it works well as-is.
3737
3838Generally, ElasticSearch queries are done using the ` ElasticSearch ` Eel helper. In case you want
39- to retieve a * list of nodes* , you'll generally do:
39+ to retrieve a * list of nodes* , you'll generally do:
4040```
4141nodes = ${ElasticSearch.query(site)....execute()}
4242```
@@ -46,10 +46,15 @@ In case you just want to retrieve a *single node*, the form of a query is as fol
4646nodes = ${q(ElasticSearch.query(site)....execute()).get(0)}
4747```
4848
49+ To fetch the total number of hits a query returns, the form of a query is as follows:
50+ ```
51+ nodes = ${ElasticSearch.query(site)....count()}
52+ ```
53+
4954All queries search underneath a certain subnode. In case you want to search "globally", you will
5055search underneath the current site node (like in the example above).
5156
52- Furthermore, the following operators are supported:
57+ Furthermore, the following operators are supported:
5358
5459* ` nodeType("Your.Node:Type") `
5560* ` exactMatch(key, value) ` ; supports simple types: ` exactMatch('tag', 'foo') ` , or node references: ` exactMatch('author', authorNode) `
@@ -116,7 +121,7 @@ ElasticSearch `_all` field, and are configured with different `boost` values.
116121In order to search this index, you can just search inside the ` _all ` field with an additional limitation
117122of ` __typeAndSupertypes ` containing ` TYPO3.Neos:Document ` .
118123
119- ** Currently, this package does not contain a plugin for searching, though we might provide one lateron .**
124+ ** Currently, this package does not contain a plugin for searching, though we might provide one later on .**
120125
121126
122127## Advanced: Configuration of Indexing
@@ -125,13 +130,13 @@ of `__typeAndSupertypes` containing `TYPO3.Neos:Document`.
125130
126131Indexing of properties is configured at two places. The defaults per-data-type are configured
127132inside ` Flowpack.ElasticSearch.ContentRepositoryAdaptor.defaultConfigurationPerType ` of ` Settings.yaml ` .
128- Furthermore, this can be overridden using the ` properties.[....].elasticSearch ` path inside
133+ Furthermore, this can be overridden using the ` properties.[....].elasticSearch ` path inside
129134` NodeTypes.yaml ` .
130135
131136This configuration contains two parts:
132137
133138* Underneath ` mapping ` , the ElasticSearch property mapping can be defined.
134- * Underneath ` indexing ` , an Eel expression which preprocesses the value before indexing has to be
139+ * Underneath ` indexing ` , an Eel expression which processes the value before indexing has to be
135140 specified. It has access to the current ` value ` and the current ` node ` .
136141
137142Example (from the default configuration):
@@ -141,7 +146,7 @@ Flowpack:
141146 ElasticSearch:
142147 ContentRepositoryAdaptor:
143148 defaultConfigurationPerType:
144-
149+
145150 # strings should, by default, not be included in the _all field; and
146151 # indexing should just use their simple value.
147152 string:
@@ -167,7 +172,7 @@ Flowpack:
167172 indexing: '${(node.hiddenBeforeDateTime ? node.hiddenBeforeDateTime.format("Y-m-d\TH:i:s") + "Z" : null)}'
168173```
169174
170- There are a few indexing helpers inside the ` ElasticSearch ` namespace which are usable inside the
175+ There are a few indexing helpers inside the ` ElasticSearch ` namespace which are usable inside the
171176` indexing ` expression. In most cases, you don't need to touch this, but they were needed to build up
172177the standard indexing configuration:
173178
0 commit comments